1. 程式人生 > >tensorflow模型量化

tensorflow模型量化

 

tensorflow模型量化
/DATA/share/DeepLearning/code/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \
--in_graph=./model_resnet100.pb \
--out_graph=/tmp/model_resnet100_quantized_graph.pb \
--inputs=input0 \
--outputs=fcblock/fc1/add_1 \
--transforms='add_default_attributes strip_unused_nodes(type=float, shape="1,112,112,3")
remove_nodes(op=Identity, op=CheckNumerics) fold_constants(ignore_errors=true)
fold_batch_norms fold_old_batch_norms quantize_weights quantize_nodes
strip_unused_nodes sort_by_execution_order'