Add code ticks around pushing model to device example, and spacing for code blocks.
PiperOrigin-RevId: 334467352 Change-Id: I3c0016502b16ab8425d5e071c9175e97713f51d7
This commit is contained in:
parent
df4033fc95
commit
a33e1875e3
@ -9,9 +9,11 @@ both on desktop machines and on Android.
|
||||
|
||||
### On Android:
|
||||
|
||||
(0) Refer to https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android to edit the `WORKSPACE` to configure the android NDK/SDK.
|
||||
(0) Refer to https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android
|
||||
to edit the `WORKSPACE` to configure the android NDK/SDK.
|
||||
|
||||
(1) build for your specific platform, e.g.:
|
||||
|
||||
```
|
||||
bazel build -c opt \
|
||||
--crosstool_top=//external:android/crosstool \
|
||||
@ -23,14 +25,19 @@ bazel build -c opt \
|
||||
|
||||
(2) Connect your phone. Push the binary to your phone with adb push
|
||||
(make the directory if required):
|
||||
|
||||
```
|
||||
adb push bazel-bin/tensorflow/tools/benchmark/benchmark_model /data/local/tmp
|
||||
```
|
||||
|
||||
(3) Push the compute graph that you need to test. For example:
|
||||
adb push tensorflow_inception_graph.pb /data/local/tmp
|
||||
|
||||
```
|
||||
adb push tensorflow_inception_graph.pb /data/local/tmp
|
||||
```
|
||||
|
||||
(4) Run the benchmark. For example:
|
||||
|
||||
```
|
||||
adb shell /data/local/tmp/benchmark_model \
|
||||
--graph=/data/local/tmp/tensorflow_inception_graph.pb \
|
||||
@ -39,14 +46,17 @@ adb shell /data/local/tmp/benchmark_model \
|
||||
--input_layer_type="float" \
|
||||
--output_layer="output:0"
|
||||
```
|
||||
|
||||
### On desktop:
|
||||
(1) build the binary
|
||||
|
||||
```
|
||||
bazel build -c opt tensorflow/tools/benchmark:benchmark_model
|
||||
```
|
||||
|
||||
(2) Run on your compute graph, similar to the Android case but without the need of adb shell.
|
||||
For example:
|
||||
(2) Run on your compute graph, similar to the Android case but without the need
|
||||
of adb shell. For example:
|
||||
|
||||
```
|
||||
bazel-bin/tensorflow/tools/benchmark/benchmark_model \
|
||||
--graph=tensorflow_inception_graph.pb \
|
||||
|
Loading…
Reference in New Issue
Block a user