MCPcopy Index your code
hub / github.com/IDSIA/brainstorm

github.com/IDSIA/brainstorm @0.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.5 ↗ · + Follow
1,195 symbols 4,301 edges 99 files 230 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Brainstorm

Documentation Status PyPi Version MIT license Python Versions

Brainstorm makes working with neural networks fast, flexible and fun.

Combining lessons from previous projects with new design elements, and written entirely in Python, Brainstorm has been designed to work on multiple platforms with multiple computing backends.

Getting Started

A good point to start is the brief walkthrough of the cifar10_cnn.py example.
More documentation is in progress, and hosted on ReadTheDocs. If you wish, you can also run the data preparation scripts (data directory) and look at some basic examples (examples directory).

Status

Brainstorm is under active development and is currently in beta.

The currently available feature set includes recurrent (simple, LSTM, Clockwork), 2D convolution/pooling, Highway and batch normalization layers. API documentation is fairly complete and we are currently working on tutorials and usage guides.

Brainstorm abstracts computations via handlers with a consistent API. Currently, two handlers are provided: NumpyHandler for computations on the CPU (through Numpy/Cython) and PyCudaHandler for the GPU (through PyCUDA and scikit-cuda).

Installation

Here are some quick instructions for installing the latest master branch on Ubuntu.

# Install pre-requisites
sudo apt-get update
sudo apt-get install python-dev libhdf5-dev git python-pip
# Get brainstorm
git clone https://github.com/IDSIA/brainstorm
# Install
cd brainstorm
[sudo] pip install -r requirements.txt
[sudo] python setup.py install
# Build local documentation (optional)
sudo apt-get install python-sphinx
make docs
# Install visualization dependencies (optional)
sudo apt-get install graphviz libgraphviz-dev pkg-config
[sudo] pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"

To use your CUDA installation with brainstorm:

$ [sudo] pip install -r pycuda_requirements.txt

Set location for storing datasets:

echo "export BRAINSTORM_DATA_DIR=/home/my_data_dir/" >> ~/.bashrc

Help and Support

If you have any suggestions or questions, please post to the Google group.

If you encounter any errors or problems, please let us know by opening an issue.

License

MIT License. Please see the LICENSE file.

Acknowledgements

Klaus Greff and Rupesh Srivastava would like to thank Jürgen Schmidhuber for his continuous supervision and encouragement. Funding from EU projects NASCENCE (FP7-ICT-317662) and WAY (FP7-ICT-288551) was instrumental during the development of this project. We also thank Nvidia Corporation for their donation of GPUs.

Core symbols most depended-on inside this repo

reshape
called by 121
brainstorm/handlers/debug_handler.py
items
called by 92
brainstorm/structure/buffer_views.py
keys
called by 86
brainstorm/structure/buffer_views.py
get
called by 69
brainstorm/structure/network.py
dot_add_mm
called by 61
brainstorm/handlers/base_handler.py
zeros
called by 58
brainstorm/handlers/base_handler.py
flatten_time
called by 57
brainstorm/utils.py
flatten_time_and_features
called by 55
brainstorm/utils.py

Shape

Method 576
Function 466
Class 151
Route 2

Languages

Python100%

Modules by API surface

brainstorm/hooks.py73 symbols
brainstorm/tests/test_describable.py70 symbols
brainstorm/handlers/debug_handler.py68 symbols
brainstorm/handlers/pycuda_handler.py60 symbols
brainstorm/handlers/numpy_handler.py58 symbols
brainstorm/handlers/base_handler.py56 symbols
brainstorm/tests/test_layers.py46 symbols
brainstorm/initializers.py42 symbols
brainstorm/tests/test_handlers_against_reference.py41 symbols
brainstorm/data_iterators.py32 symbols
brainstorm/value_modifiers.py28 symbols
brainstorm/structure/layout.py25 symbols

For agents

$ claude mcp add brainstorm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact