Wrapper around Microsoft CNTK library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.gitignore
Cargo.toml
LICENSE-APACHE.txt update to cntk 2.3 and licenses Nov 29, 2017
LICENSE-MIT.txt
README.md
build.rs

README.md

Bindings for CNTK library

Simple low level bindings for CNTK library from Microsoft.

API Documentation

Status

Currently exploring ways how to interact with C++ API nicely from Rust. Expect a lot of breaking changes.

Build scripts are not ready yet, might not work outside of 64bit linux.

Goals

  • Ability to train all reasonable architectures
  • No memory leaks
  • Reasonable ease of use

Nongoals

  • Idiomatic Rust everywhere
  • Super good ergonomics
  • Avoiding all unnecessary copies

Building and installing

You need to have CNTK-2.3 installed and paths to includes and library files in relevant enviroment variables (cntk activate scripts does this well). You also need g++-4.8 installed (because CNTK uses it to compile things).

Example usage

See examples folder.

Other limitations

Only works with single precision (f32 in Rust, float in C++) types. Only works with dense representations of vectors/matrices/tensors. Only works with ASCII strings for variable names and filenames.

What works

  • Passing data in and out of computation.
  • Backpropagation.
  • Training fully connected feedforward, convolutional and recurrent network.
  • Saving and loading the model.
  • Code for most operations. - Almost all, except couple of helpers.
  • Demo of seq2seq model training.
  • Turning c++ exception into rust panics (most of the time).
  • Interop with NDArray library.

Planned in future

  • GPU.
  • Better docs.
  • Finish all operations.
  • Better build scripts.
  • Figure out whether we want NDArrayView or go directly from Rust data to Value and back.
  • Builder pattern where appropriate (Variable?).