#neural-network #collenchyma #computation #hpc #plugin


collenchyma plugin providing Neural Network operations

9 unstable releases (3 breaking)

Uses old Rust 2015

0.3.4 Mar 3, 2016
0.3.3 Mar 3, 2016
0.3.1 Feb 24, 2016
0.2.1 Jan 21, 2016
0.0.1 Dec 7, 2015

#1111 in Algorithms

Download history 34/week @ 2023-10-29 18/week @ 2023-11-05 16/week @ 2023-11-12 17/week @ 2023-11-19 43/week @ 2023-11-26 36/week @ 2023-12-03 9/week @ 2023-12-10 24/week @ 2023-12-17 40/week @ 2023-12-24 7/week @ 2023-12-31 14/week @ 2024-01-07 24/week @ 2024-01-14 29/week @ 2024-01-21 44/week @ 2024-01-28 11/week @ 2024-02-04 53/week @ 2024-02-11

140 downloads per month
Used in leaf



collenchyma-NN • Join the chat at https://gitter.im/autumnai/collenchyma Build Status Crates.io License

collenchyma-NN provides Neural Network related algorithms for Collenchyma. Run NN operations on servers, desktops or mobiles, GPUs, FPGAs or CPUS, without carrying about OpenCL or CUDA support on the machine.

collenchyma-NN was started at Autumn to support the Machine Intelligence Framework Leaf with backend-agnostic, state-of-the-art performance.

For more information,

Provided Operations

This Plugins provides the following operations to the Collenchyma Backend. Every Operation includes forward + backward. A - means not yet implemented. More information can be found in the Documentation.

Operation CUDA OpenCL Native
Sigmoid cuDNN v3 - Rust
SigmoidPointwise cuDNN v3 -
ReLU cuDNN v3 - Rust
ReLUPointwise cuDNN v3 -
Tanh cudNN v3 - Rust
TanhPointwise cudNN v3 -
Normalization (LRN) cudNN v3 - -
Convolution cudNN v3 - -
Softmax cudNN v3 - Rust
LogSoftmax cudNN v3 - Rust
Pooling Max cudNN v3 - -
Pooling Avg cudNN v3 - -

Kudos to ehiggs, for implementing the native Rust operations.

Getting Started

If you're using Cargo, just add collenchyma-NN to your Cargo.toml:

collenchyma = "0.0.8"
collenchyma-nn = "0.3.4"

If you're using Cargo Edit, you can call:

$ cargo add collenchyma-nn


Bring the Plugin trait and the other important Collenchyma traits/structs in scope and you will be able to execute the here provided operations on your Collenchyma Backend.

extern crate collenchyma as co;
extern crate collenchyma_nn as nn;
use co::prelude::*;
use nn::*;
fn main() {
    // Initialize a CUDA Backend.
    let backend = Backend::<Cuda>::default().unwrap();
    // Initialize two SharedTensors.
    // Usually you would want also fill them with data.
    // More infos about that in the Collenchyma README.md
    let mut x = SharedTensor::<f32>::new(backend.device(), &(1, 1, 3)).unwrap();
    let mut result = SharedTensor::<f32>::new(backend.device(), &(1, 1, 3)).unwrap();
    // Use the operation provided by this Plugin.
    backend.sigmoid(&mut x, &mut result);


Want to contribute? Awesome! We have instructions to help you get started contributing code or documentation. And high priority issues, that we could need your help with.

We have a mostly real-time collaboration culture and happens here on Github and on the Collenchyma Gitter Channel. You can also reach out to the Maintainers {@MJ, @hobofan}.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.


A changelog is a log or record of all the changes made to a project, such as a website or software project, usually including such records as bug fixes, new features, etc. - Wikipedia

You can find the release history at the CHANGELOG file.

We are using Clog, the Rust tool for auto generating CHANGELOG files.


Licensed under either of

at your option.


~27K SLoC