Getting started

Installation

To install NengoLMU, we recommend using pip.

pip install lmu

Before running this command, please ensure your system meets the NengoLMU requirements.

Requirements

NengoLMU works with Python 3.6 or later. After installing NumPy and TensorFlow, pip will do its best to install all of the package’s other requirements when it installs NengoLMU. However, if anything goes wrong during this process, you can install each required package manually and then try to pip install lmu again.

Developer installation

If you want to modify NengoLMU, or get the very latest updates, you will need to perform a developer installation:

git clone https://github.com/abr/lmu
pip install -e ./lmu

Installing TensorFlow

NengoLMU is designed to work within TensorFlow. Assuming you have the required libraries installed, the latest version of TensorFlow can be using pip install tensorflow

To use TensorFlow with GPU support, you will need to have the CUDA/cuDNN libraries installed on your system. For this, we recommend you use conda to simplify the installation process. conda install tensorflow-gpu will install the TensorFlow package as well as all the CUDA/cuDNN requirements. If you run into any problems, see the TensorFlow GPU installation instructions for more details.

In addition to CUDA/cuDNN, TensorFlow’s GPU acceleration is only supported with Nvidia GPUs. Acquiring the appropriate drivers for your Nvidia GPU depends on your system. On Linux, the correct Nvidia drivers (as of TensorFlow 2.2.0) can be installed via the command sudo apt install nvidia-driver-440. On Windows, Nvidia drivers can be downloaded from their website.

It is also possible to build TensorFlow from source. This is significantly more complicated but allows you to customize the installation to your specific system configuration, which can improve simulation speeds. See the system specific instructions below:

Installing other packages

The steps above will only install NengoLMU’s required dependencies. Optional NengoLMU features require additional packages to be installed.

  • Running the test suite requires pytest.

  • Building the documentation requires Sphinx, NumPyDoc, nengo_sphinx_theme, and a few other packages.

These additional dependencies can also be installed through pip when installing NengoLMU.

pip install lmu[tests]  # Needed to run unit tests
pip install lmu[docs]  # Needed to build docs
pip install lmu[all]  # All of the above

Next steps

  • If you want to learn how to use NengoLMU in your models, read through the basic usage page.

  • For a more detailed understanding of the various classes and functions in the NengoLMU package, refer to the API reference.

  • If you are interested to learn the theoretical background behind how the Legendre Memory Unit works, we recommend reading this technical overview.

  • If you would like to see how NengoLMU is incorporated into various models, check out our examples.