This repository was archived by the owner on Dec 31, 2020. It is now read-only.
File tree 1 file changed +15
-11
lines changed
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 3
3
4
4
## Building
5
5
6
- ### Build TensorFlow
7
-
8
- Please refer to TensorFlow for general instructions.
9
-
10
- Additional steps are required to use the new TensorFlow Java library. Here's how to
11
- build and install the library to the local Maven repository:
12
-
6
+ ## Build Example
7
+ A set of examples are provided as a ready-to-run JAR file. To build:
13
8
``` sh
14
- $ cd $TENSORFLOW_HOME
15
- $ bazel build //tensorflow/java:tensorflow //tensorflow/java:pom
16
- mvn install:install-file -Dfile=bazel-bin/tensorflow/java/libtensorflow.jar -DpomFile=bazel-bin/tensorflow/java/pom.xml
9
+ $ mvn clean package
17
10
```
18
11
12
+ The build file is located at: ` flink-tensorflow-examples/target/flink-tensorflow-examples_2.11-0.1-SNAPSHOT.jar `
13
+
19
14
### Run Tests
20
15
The project uses JUnit and the Maven Surefire plugin. Be sure to add the
21
16
the native tensorflow library to the Java native library path.
22
17
23
18
To run the tests:
24
19
25
20
``` sh
26
- $ mvn surefire:test -DargLine= " -Djava.library.path= $TF_HOME /bazel-bin/tensorflow/java "
21
+ $ mvn surefire:test
27
22
```
28
23
24
+ ## Running the Examples
25
+ _ Prerequisite: install and run Apache Flink 1.2._
26
+
27
+ ### Inception
28
+ 1 . Download the inception5h model.
29
+ 2 . Launch the inception demo:
30
+ ```
31
+ $ flink run -c org.apache.flink.contrib.tensorflow.examples.inception.Inception flink-tensorflow-examples/target/flink-tensorflow-examples_2.11-0.1-SNAPSHOT.jar <path-to-inception5h> <path-to-image-files>
32
+ ```
You can’t perform that action at this time.
0 commit comments