@@ -10,17 +10,22 @@ stable API. This is especially true because the underlying TensorFlow C API has
10
10
been stabilized as well.
11
11
12
12
* [ Documentation] ( https://tensorflow.github.io/rust/tensorflow/ )
13
+ * [ TensorFlow Rust Google Group] ( https://groups.google.com/a/tensorflow.org/forum/#!forum/rust )
13
14
* [ TensorFlow website] ( https://www.tensorflow.org )
14
15
* [ TensorFlow GitHub page] ( https://github.com/tensorflow/tensorflow )
15
16
16
17
## Getting Started
17
- Since this crate depends on the TensorFlow C API, it needs to be compiled first. This crate will
18
- automatically compile TensorFlow for you, but it is also possible to manually install TensorFlow
19
- and the crate will pick it up accordingly.
18
+ Since this crate depends on the TensorFlow C API, it needs to be downloaded or compiled first. This
19
+ crate will automatically download or compile the TensorFlow shared libraries for you, but it is also
20
+ possible to manually install TensorFlow and the crate will pick it up accordingly.
20
21
21
22
### Prerequisites
22
- The following dependencies are needed to compile and build this crate (assuming TensorFlow itself
23
- should also be compiled transparently):
23
+ If the TensorFlow shared libraries can already be found on your system, they will be used. If your
24
+ system is x86-64 Linux or Mac, a prebuilt binary will be downloaded, and no special prerequisites
25
+ are needed.
26
+
27
+ Otherwise, the following dependencies are needed to compile and build this crate, which involves
28
+ compiling TensorFlow itself:
24
29
25
30
- git
26
31
- [ bazel] ( https://bazel.build/ )
@@ -31,6 +36,9 @@ The TensorFlow website provides detailed instructions on how to obtain and insta
31
36
so if you are unsure please [ check out the docs] ( https://www.tensorflow.org/install/install_sources )
32
37
for further details.
33
38
39
+ Some of the examples use TensorFlow code written in Python and require a full TensorFlow
40
+ intallation.
41
+
34
42
### Usage
35
43
Add this to your ` Cargo.toml ` :
36
44
@@ -73,7 +81,7 @@ In short:
73
81
1 . Install [ SWIG] ( http://www.swig.org ) and [ NumPy] ( http://www.numpy.org ) . The
74
82
version from your distro's package manager should be fine for these two.
75
83
2 . [ Install Bazel] ( https://bazel.io/docs/install.html ) , which you may need to do
76
- from source.
84
+ from source. You will likely need an up-to-date version.
77
85
3 . ` git clone https://github.com/tensorflow/tensorflow `
78
86
4 . ` cd tensorflow `
79
87
5 . ` ./configure `
@@ -82,8 +90,8 @@ In short:
82
90
Using ` --jobs=1 ` is recommended unless you have a lot of RAM, because
83
91
TensorFlow's build is very memory intensive.
84
92
85
- Copy ` $TENSORFLOW_SRC/bazel-bin/tensorflow/libtensorflow.so ` to ` /usr/local/lib ` .
86
- If this is not possible, add ` $TENSORFLOW_SRC/bazel-bin/tensorflow ` to
93
+ Copy ` $TENSORFLOW_SRC/bazel-bin/tensorflow/libtensorflow.so ` and ` libtensorflow_framework.so ` to
94
+ ` /usr/local/lib ` . If this is not possible, add ` $TENSORFLOW_SRC/bazel-bin/tensorflow ` to
87
95
` LD_LIBRARY_PATH ` .
88
96
89
97
You may need to run ` ldconfig ` to reset ` ld ` 's cache after copying ` libtensorflow.so ` .
@@ -100,6 +108,12 @@ use. See http://doc.crates.io/manifest.html#the-features-section.
100
108
(We would prefer using an ` #[unstable] ` attribute, but that
101
109
[ doesn't exist] ( https://github.com/rust-lang/rfcs/issues/1491 ) yet.)
102
110
111
+ ### How do I...?
112
+ Try the [ documentation] ( https://tensorflow.github.io/rust/tensorflow/ ) first, and see if it answers
113
+ your question. If not, take a look at the examples folder. Note that there may not be an example
114
+ for your exact question, but it may be answered by an example demonstrating something else.
115
+
116
+
103
117
## Contributing
104
118
Developers and users are welcome to join the
105
119
[ TensorFlow Rust Google Group] ( https://groups.google.com/a/tensorflow.org/forum/#!forum/rust ) .
0 commit comments