A TensorFlow-powered python toolbox to train deep neural networks to perform motor tasks.


The full implementation code is available on GitHub. Watch and star the repository to be notified of updates and code release dates. Also feel free to consult the Changelog for information about what's new.

Released distributions are available online on the PyPI website.

If you are interested in collaborations, feel free to get in touch via Email.


Artificial neural networks (ANNs) are a popular class of computational models for studying neural control of movement. Typically, they are used in conjunction with third-party biomechanical simulation software, with the neural network trained to control the biomechanical effector. This leads to several impracticalities: (1) researchers must rely on two different platforms and (2) biomechanical effectors are not differentiable, constraining researchers to reinforcement learning algorithms despite the existence and potential biological relevance of faster training methods. To date, this has been mitigated by training multi-layer perceptrons as “forward models” approximating the behaviour of effectors from third-party software. However, this does not address (1) and remains a slow, cumbersome process when iterating over many different models and effectors. To address these issues, we developed MotorNet, an open-source Python toolbox that allows creating arbitrarily complex, differentiable, and biomechanically realistic effectors to train ANNs on user-defined motor tasks. It is designed to meet several goals: ease of installation, ease of use, a high-level and user-friendly API, and a modular architecture to allow for flexibility in model building and task design. MotorNet requires no dependencies beyond typical Python toolboxes available on the Anaconda library, making it easy to get started with. For instance, it allows training ANNs on typically used motor control models such as a two degrees of freedom, six muscles planar arm within minutes on a typical desktop computer. MotorNet is built on TensorFlow and therefore can implement any network architecture that is possible using the TensorFlow framework. Consequently, it will immediately benefit from advances in the artificial intelligence (AI) field through TensorFlow updates. Finally, it is open source, enabling users to create and share their own improvements, such as new effector and network architectures or custom task designs for the ANN to perform. Overall, we hope MotorNet’s focus on higher order model and task design will alleviate overhead cost to initiate computational projects for new researchers by providing a standalone, ready-to-go framework, and speed up study progress of established computational teams by enabling a focus on concepts and ideas over implementation details.


The pre-print is available on bioRXiv.


Poster #

This poster on MotorNet was presented at the 31st meeting of the Society for the Neural Control of Movement in July 2022 in Dublin, Ireland.


Please cite our pre-print as follows:

  author = {Codol, Olivier and Michaels, Jonathan A. and Kashefi, Mehrdad and Pruszynski, J. Andrew and Gribble, Paul L.},
  title = {MotorNet: a Python toolbox for controlling differentiable biomechanical effectors with artificial neural networks},
  year = {2023},
  doi = {10.1101/2023.02.17.528969},
  publisher = {Cold Spring Harbor Laboratory},
  URL = {},
  journal = {bioRxiv},


API Reference Manual

Indices and tables#