This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tensorflow/contrib/makefile/download_dependencies.sh | |
| tensorflow/contrib/makefile/rename_protobuf.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build tensorflow/python/tools:freeze_graph | |
| bazel-bin/tensorflow/python/tools/freeze_graph \ | |
| --input_graph=/tmp/model/my_graph.pb \ | |
| --input_checkpoint=/tmp/model/model.ckpt-1000 \ | |
| --output_graph=/tmp/frozen_graph.pb \ | |
| --input_node_names=input_node \ | |
| --output_node_names=output_node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel run tensorflow/tools/graph_transforms:summarize_graph -- \ | |
| --in_graph=tensorflow_inception_graph.pb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel run tensorflow/tools/graph_transforms:transform_graph -- \ | |
| --in_graph=tensorflow_inception_graph.pb \ | |
| --out_graph=optimized_inception_graph.pb --inputs='Mul' \ | |
| --outputs='softmax' --transforms='strip_unused_nodes(type=float, shape="1,299,299,3") fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep 'REGISTER.*"Mul"' tensorflow/core/kernels/*.cc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build tensorflow/tools/graph_transforms:summarize_graph \ | |
| && bazel-bin/tensorflow/tools/graph_transforms/summarize_graph \ | |
| --in_graph=/tmp/tensorflow_inception_graph.pb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build tensorflow/tools/graph_transforms:transform_graph \ | |
| && blaze-bin/tensorflow/tools/graph_transforms/transform_graph \ | |
| --in_graph=/tmp/tensorflow_inception_optimized.pb \ | |
| --out_graph=/tmp/tensorflow_inception_quantized.pb \ | |
| --inputs='Mul:0' \ | |
| --outputs='softmax:0' \ | |
| --transforms='quantize_weights' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build -c opt tensorflow/tools/benchmark:benchmark_model \ | |
| && bazel-bin/tensorflow/tools/benchmark/benchmark_model \ | |
| --graph=/tmp/inception_graph.pb --input_layer="Mul:0" \ | |
| --input_layer_shape="1,299,299,3" --input_layer_type="float" \ | |
| --output_layer="softmax:0" \ | |
| --show_run_order=false --show_time=false \ | |
| --show_memory=false --show_summary=true --show_flops=true \ | |
| --logtostderr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build -c opt tensorflow/tools/benchmark:benchmark_model \ | |
| && bazel-bin/tensorflow/tools/benchmark/benchmark_model \ | |
| --graph=/tmp/tensorflow_inception_graph.pb \ | |
| --input_layer="Mul" --input_layer_shape="1,299,299,3" \ | |
| --input_layer_type="float" --output_layer="softmax:0" \ | |
| --show_run_order=false --show_time=false \ | |
| --show_memory=false --show_summary=true \ | |
| --show_flops=true --logtostderr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build -c opt --config=android_arm64 \ | |
| tensorflow/tools/benchmark:benchmark_model | |
| adb push bazel-bin/tensorflow/tools/benchmark/benchmark_model \ | |
| /data/local/tmp | |
| adb push /tmp/tensorflow_inception_graph.pb /data/local/tmp/ | |
| adb shell '/data/local/tmp/benchmark_model \ | |
| --graph=/data/local/tmp/tensorflow_inception_graph.pb \ | |
| --input_layer="Mul" --input_layer_shape="1,299,299,3" \ | |
| --input_layer_type="float" --output_layer="softmax:0" \ | |
| --show_run_order=false --show_time=false |