Skip to main content

A package for deep learning models for neuroscience

Project description

Documentation | Join our Discord community

PyPI version Documentation Status Tests Linting Discord

torch_brain is a Python library for various deep learning models designed for neuroscience.

Features

  • Multi-recording training
  • Optimized data loading with with on-demand data access -- only loads data when needed
  • Advanced samplers that enable arbitrary slicing of data on the fly
  • Advanced data collation strategies including chaining and padding
  • Support for arbitrary neural and behavioral modalities
  • Collection of useful nn.Modules like stitchers, multi-output readouts, infinite vocab embeddings, etc.
  • Collection of neural and behavioral transforms and augmentation strategies
  • Implementations of various deep learning models for neuroscience

List of implemented models

Installation

torch_brain is available for Python >= 3.10 and can be installed via pip.

We recommend using a virtual environment to manage dependencies, and Python 3.10.

To create and activate a new virtual environment with venv, run:

python3 -m venv venv
source venv/bin/activate  # On Windows, use: .venv\Scripts\activate
pip install torch_brain

Contributing

If you are planning to contribute to the package, you can install the package in development mode by running the following command:

pip install -e ".[dev]"

Install pre-commit hooks:

pre-commit install

Unit tests are located under test/. Run the entire test suite with

pytest

or test individual files via, e.g., pytest test/test_binning.py

Building documentation for development

Install requirements:

pip install -e ".[dev,docs]"

Build:

cd docs
make clean html

The documentation is then present in docs/build/html

Cite

Please cite our paper if you use this code in your own work:

@inproceedings{
    azabou2023unified,
    title={A Unified, Scalable Framework for Neural Population Decoding},
    author={Mehdi Azabou and Vinam Arora and Venkataramana Ganesh and Ximeng Mao and Santosh Nachimuthu and Michael Mendelson and Blake Richards and Matthew Perich and Guillaume Lajoie and Eva L. Dyer},
    booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
    year={2023},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_brain-0.1.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_brain-0.1.2-py3-none-any.whl (83.8 kB view details)

Uploaded Python 3

File details

Details for the file torch_brain-0.1.2.tar.gz.

File metadata

  • Download URL: torch_brain-0.1.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for torch_brain-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2305357070327f0182a11be72e13c68d4585a348e83e44a1c54cd0e79d4be4ac
MD5 804d0cbfb07069c58947b87b8d5d6d79
BLAKE2b-256 64f75e52f5ca1c5a98e95b157316a0334dc04e671432c97c24e5bb8b19da6a9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_brain-0.1.2.tar.gz:

Publisher: publish.yml on neuro-galaxy/torch_brain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_brain-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: torch_brain-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 83.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for torch_brain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 734d7c816d5662b5c8a122819a6235f3c3484442e48e2b09a09ed055d9b6c88c
MD5 c550b9b614dc5a2446a1d58a3f1c69be
BLAKE2b-256 90634754b1e3aac088a5c5bb9a19b84f4212d2ac7cf23d6776b1911bca23f6a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_brain-0.1.2-py3-none-any.whl:

Publisher: publish.yml on neuro-galaxy/torch_brain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page