Skip to content

Instantly share code, notes, and snippets.

@bmount
Created July 13, 2017 10:04
Show Gist options
  • Save bmount/a4e81b63aed2e03ff515c0a01ec573e2 to your computer and use it in GitHub Desktop.
Save bmount/a4e81b63aed2e03ff515c0a01ec573e2 to your computer and use it in GitHub Desktop.
(Minimal) conversion of TensorFlow object detection graph for inference
bazel build tensorflow/tools/graph_transforms:transform_graph
bazel-bin/tensorflow/tools/graph_transforms/transform_graph --in_graph=../models/object_detection/ssd_mobilenet_v1_coco_11_06_2017/frozen_inference_graph.pb --out_graph=transformed_inference_graph.pb --inputs='image_tensor' --outputs='detection_boxes,detection_scores,detection_classes,num_detections' --transforms='
add_default_attributes
strip_unused_nodes(type=float)
remove_nodes(op=CheckNumerics)
fold_constants(ignore_errors=true)
fold_batch_norms
fold_old_batch_norms
fuse_resize_pad_and_conv
fuse_pad_and_conv
fuse_resize_and_conv
strip_unused_nodes
sort_by_execution_order'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment