This file contains 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 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 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 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 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 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
curl https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015_stripped.zip \ | |
-o /tmp/inception_dec_2015_stripped.zip | |
unzip /tmp/inception_dec_2015_stripped.zip \ | |
-d tensorflow/contrib/pi_examples/label_image/data/ |
This file contains 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
make -f tensorflow/contrib/makefile/Makefile HOST_OS=PI \ | |
TARGET=PI OPTFLAGS="-Os -mfpu=neon-vfpv4 \ | |
-funsafe-math-optimizations -ftree-vectorize" CXX=g++-4.8 |
This file contains 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
make -f tensorflow/contrib/makefile/Makefile HOST_OS=PI \ | |
TARGET=PI OPTFLAGS="-Os" CXX=g++-4.8 |
This file contains 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 | |
sudo apt-get install -y \ | |
autoconf automake libtool gcc-4.8 g++-4.8 | |
cd tensorflow/contrib/makefile/downloads/protobuf/ | |
./autogen.sh | |
./configure | |
make | |
sudo make install | |
sudo ldconfig # refresh shared library cache | |
cd ../../../../.. |
This file contains 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
mkdir -p ~/graphs | |
curl -o ~/graphs/inception5h.zip \ | |
https://storage.googleapis.com/download.tensorflow.org/ \ | |
models/inception5h.zip | |
unzip ~/graphs/inception5h.zip -d ~/graphs/inception5h | |
cp ~/graphs/inception5h/* \ | |
tensorflow/examples/ios/benchmark/data/ | |
cp ~/graphs/inception5h/* \ | |
tensorflow/examples/ios/camera/data/ | |
cp ~/graphs/inception5h/* \ |