- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have trained a tensorflow inception v3 model following the below steps, can anyone suggest how to convert it to a graph for ncsdk?
1.
retrain the inception model.
ref: https://github.com/googlecodelabs/tensorflow-for-poets-2
python scripts/retrain.py --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --image_dir=tf_files/images/
2.
remove nodes so it can be loaded with cv2.dnn.readNetFromTensorflow
ref: http://answers.opencv.org/question/175699/readnetfromtensorflow-fails-on-retrained-nn/
python ~/tensorflow/tensorflow/python/tools/optimize_for_inference.py \
--input graph.pb \
--output opt_graph.pb \
--frozen_graph True \
--input_names DecodeJpeg/contents \
--output_names final_result
~/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \
--in_graph=opt_graph.pb \
--out_graph=final_graph.pb \
--inputs=Mul \
--outputs=final_result \
--transforms="remove_nodes(op=PlaceholderWithDefault) strip_unused_nodes(type=float, shape=\"1,299,299,3\") sort_by_execution_order"
- Tags:
- Tensorflow
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page