<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic compile tensorflow inception v3 retrain graph in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/compile-tensorflow-inception-v3-retrain-graph/m-p/711486#M6279</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have trained a tensorflow inception v3 model following the below steps, can anyone suggest how to convert it to a graph for ncsdk?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;retrain the inception model.&lt;P&gt;&amp;nbsp;&lt;/P&gt;ref: &lt;A href="https://github.com/googlecodelabs/tensorflow-for-poets-2"&gt;https://github.com/googlecodelabs/tensorflow-for-poets-2&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;python scripts/retrain.py --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --image_dir=tf_files/images/&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;remove nodes so it can be loaded with cv2.dnn.readNetFromTensorflow&lt;P&gt;&amp;nbsp;&lt;/P&gt;ref: &lt;A href="http://answers.opencv.org/question/175699/readnetfromtensorflow-fails-on-retrained-nn/"&gt;http://answers.opencv.org/question/175699/readnetfromtensorflow-fails-on-retrained-nn/&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;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"
&lt;/CODE&gt;</description>
    <pubDate>Thu, 22 Nov 2018 14:12:58 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2018-11-22T14:12:58Z</dc:date>
    <item>
      <title>compile tensorflow inception v3 retrain graph</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/compile-tensorflow-inception-v3-retrain-graph/m-p/711486#M6279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have trained a tensorflow inception v3 model following the below steps, can anyone suggest how to convert it to a graph for ncsdk?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;retrain the inception model.&lt;P&gt;&amp;nbsp;&lt;/P&gt;ref: &lt;A href="https://github.com/googlecodelabs/tensorflow-for-poets-2"&gt;https://github.com/googlecodelabs/tensorflow-for-poets-2&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;python scripts/retrain.py --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --image_dir=tf_files/images/&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;remove nodes so it can be loaded with cv2.dnn.readNetFromTensorflow&lt;P&gt;&amp;nbsp;&lt;/P&gt;ref: &lt;A href="http://answers.opencv.org/question/175699/readnetfromtensorflow-fails-on-retrained-nn/"&gt;http://answers.opencv.org/question/175699/readnetfromtensorflow-fails-on-retrained-nn/&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;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"
&lt;/CODE&gt;</description>
      <pubDate>Thu, 22 Nov 2018 14:12:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/compile-tensorflow-inception-v3-retrain-graph/m-p/711486#M6279</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-11-22T14:12:58Z</dc:date>
    </item>
  </channel>
</rss>

