参考【TensorFlow】quantization量化中的二
代码地址:https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/quantize/python/quantize_graph.py
curl http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz -o /tmp/inceptionv3.tgz
tar xzf /tmp/inceptionv3.tgz -C /tmp/
bazel build tensorflow/contrib/quantization/tools:quantize_graph
bazel-bin/tensorflow/contrib/quantization/tools/quantize_graph \
--input=/tmp/classify_image_graph_def.pb \
--output_node_names="softmax"
--output=/tmp/quantized_graph.pb \ --mode=eightbit
其中quantize_graph的目录改变,更改代码为
bazel build tensorflow/contrib/quantize:quantize_graph
遇到报错
ERROR: /home/nnir712/project/tensorflow-master/tensorflow/core/grappler/costs/BUILD:281:1: C++ comp