bazel-bin / tensorflow / tools / graph_transforms / transform_graph \
- in_graph =" /家庭/.../ mobilenet_v2.pb" \
- out_graph =" /家庭/.../ mobilenet_v2_clean.pb" \
- 输入= image_tensor \
- 输出=" detection_boxes,detection_scores,detection_classes,num_detections" \
- 变换=' add_default_attributes
strip_unused_nodes
remove_nodes(op = Identity,op = CheckNumerics)
fold_constants(ignore_errors =真)
fold_batch_norms
fold_old_batch_norms
quantize_weights
quantize_nodes
strip_unused_nodes
sort_by_execution_order'
我尝试从tensorflow object_detection api量化默认的ssd移动模型。 如上所述执行转换后,我无法导入图形:
..... .....
ValueError:指定在导入期间不存在的操作的共置:SecondStagePostprocessor中的SecondStagePostprocessor / BatchMultiClassNonMaxSuppression / map / while / strided_slice / BatchMultiClassNonMaxSuppression / map / while / TensorArrayWrite_4 / TensorArrayWriteV3 / Enter