Dendritic Artificial Neural Networks (dANNs) with Receptive Fields (RFs)
These codes replicate: Chavlis, S., & Poirazi, P (2024). Dendrites endow artificial neural networks with accurate, robust and parameter-efficient learning. arXiv:2404.03708v1
To replicate the Figures of the manuscript, you need to install the Anaconda environment (see here)
- Download the executable file and install it. Then, create a new environment from a terminal upon activation of anaconda (i.e.,
conda activate) conda env create -f environment.ymlconda activate dann
You can run the files .py with python figure_2.py, for example, or train the model using the sh files.
You need to install NVIDIA driver, CUDA 12.2 and then install tensorflow, pytorch and jax with cuda compatibility.
You can find your CUDA version with the command:
nvcc --version
Tensorflow (https://www.tensorflow.org/install)
python3 -m pip install tensorflow[and-cuda]
and verify the installation:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
Pytorch (https://pytorch.org/get-started/locally/)
pip3 install torch torchvision torchaudio
and verify the installation:
python3 -c "import torch; print(torch.cuda.is_available())"
pip install -U "jax[cuda12]"
and verify the installation:
python3 -c "from jax.lib import xla_bridge; print(xla_bridge.get_backend().platform)"
pip install --extra-index-url=https://pypi.nvidia.com cuml-cu12
python unzip_data.py