[−][src]Crate neuro
Neuro
Neuro is a deep learning library that runs on the GPU. The library is designed to be very modular and allow users to easily add custom activation functions, loss functions, layers, and optimizers. The library presently supports:
- Layers: BatchNorm, Conv2D, Dense, Dropout, Flatten, MaxPool2D.
- Optimizers: Adadelta, Adam, RMSprop, SGD.
- Activations: LeakyReLU, Linear, ReLU, Sigmoid, Softmax, Tanh.
- Loss functions: BinaryCrossEntropy, CrossEntropy, MeanAbsoluteError, MeanSquaredError, SoftmaxCrossEntropy.
Additionaly, many initialization schemes are available. The current implementation allows the creation of feedforward and convolutional neural networks. It is planned to add recurrent neural networks in the future.
Installation
The crate is powered by ArrayFire to perform all operations on the GPU. The first step is therefore to install this library. When building a project, the path to the ArrayFire library must be in the path environment variables. For instance for a typical install (on Unix):
export DYLD_LIBRARY_PATH=/opt/arrayfire/lib
The models trained with neuro can be saved in the Hierarchical Data Format (HDF5). In order to do so, HDF5 1.8.4 or newer must be installed. Installation files can be found on the HDF Group website. macOS users can install it with homebrew:
brew install hdf5
To start using the library, add the following line to the project's Cargo.toml file:
[dependencies] neuro = "0.1.0"
It is highly recommended to build the project in release mode for considerable speedup (e.g. cargo run my_project --release
).
In order to quickly get started, check out the examples.
Re-exports
pub use self::tensor::Tensor; |
Modules
activations | Activation functions. |
data | Simple interfaces to import data. |
errors | Errors that may be returned by methods in the crate. |
initializers | Parameters initialization methods. |
layers | Collection of layers used to create neural networks. |
losses | Loss functions. |
metrics | Metrics used to assess the performance of the neural network. |
models | Base module to create neural networks. |
optimizers | Optimizers used to train the neural network. |
regularizers | Regularization methods. |
tensor | Wrapper around ArrayFire's array with additional helper methods. |
Macros
assert_approx_eq | Asserts if two expressions are approximately equal. |