TensorFlow Rust provides Rust language bindings for TensorFlow.
This project is still under active development and not yet ready for widespread use.
Install TensorFlow from source.
The Python/pip steps are not necesary, but building tensorflow:libtensorflow.so
is.
In short:
- Install Bazel
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
./configure
bazel build -c opt tensorflow:libtensorflow.so
Copy $TENSORFLOW_SRC/tensorflow/core/public/tensor_c_api.h to /usr/local/include, and copy $TENSORFLOW_SRC/bazel-bin/tensorflow/libtensorflow.so to /usr/local/lib. If this is not possible, add $TENSORFLOW_SRC/tensorflow/core/public to CPATH and $TENSORFLOW_SRC/bazel-bin/tensorflow to LD_LIBRARY_PATH.
You may need to run ldconfig
to reset ld
's cache after copying libtensorflow.so.
Now run cargo build
as usual.
To include the especially unstable API (which is currently the expr
module),
use --features tensorflow_unstable
.
RFCs are issues tagged with RFC. Check them out and comment. Discussions are welcome. After all, thats what a Request For Comment is for!
The especially unstable parts of the API (which is currently the expr
modul) are
feature-gated behind the feature tensorflow_unstable
to prevent accidental
use. See http://doc.crates.io/manifest.html#the-features-section.
(We would prefer using an #[unstable]
attribute, but that
doesn't exist yet.)
This project is not directly affiliated with the TensorFlow project, although we do intend to communicate and cooperate with them.
Developers and users are welcome to join #tensorflow-rust on irc.mozilla.org.
See CONTRIBUTING.md for information on how to contribute code.
This is not an official Google product.
##For more information