<p dir="auto">I am using <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0" rel="nofollow">Tensorflow for poet</a> guide for train own model. I have create retrained_graph.pb and retrained_labels.txt. While I use it in application then I get error that</p>
<p dir="auto"><code class="notranslate">Caused by: java.lang.UnsupportedOperationException: Op BatchNormWithGlobalNormalization is not available in GraphDef version 21. It has been removed in version 9. Use tf.nn.batch_normalization(). at org.tensorflow.Graph.importGraphDef(Native Method) at org.tensorflow.Graph.importGraphDef(Graph.java:118) </code></p>
<p dir="auto">After That  further train model for application use <a href="https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/" rel="nofollow">Tensorflow for mobile </a>  blog and create <strong>optimized_graph.pb, rounded_graph.pb, mmapped_graph.pb</strong> files.</p>
<p dir="auto">optimized_graph.pb and rounded_graph.pb file work in android application without any error.<br>
While use mmapped_graph.pb I get error that <strong>Failed to initialize: java.io.IOException: Not a valid TensorFlow Graph serialization: Invalid GraphDef</strong></p>
<p dir="auto">Performance of application is not good while use optimized_graph.pb and rounded_graph.pb file.While application camera screen not contain any flower photos otherwise random flower name show with high confidence rate. Any way to detect only flower and remain blank when not flowers.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/25680329/24044730/8edab30c-0b42-11e7-8209-a5fab382b81c.png"><img src="https://cloud.githubusercontent.com/assets/25680329/24044730/8edab30c-0b42-11e7-8209-a5fab382b81c.png" alt="screenshot" style="max-width: 100%;"></a></p>
<p dir="auto">I am following <a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0" rel="nofollow">Tensorflow for poet</a> instruction for retrain model. I have successfully create retrained_graph.pb and retrained_labels.txt. While I use imagenet_comp_graph_label_strings.txt and tensorflow_inception_graph.pb then application run without any error. But use my created file then I get error that:</p>
<p dir="auto"><code class="notranslate">Caused by: java.lang.UnsupportedOperationException: Op BatchNormWithGlobalNormalization is not available in GraphDef version 21. It has been removed in version 9. Use tf.nn.batch_normalization(). at org.tensorflow.Graph.importGraphDef(Native Method) at org.tensorflow.Graph.importGraphDef(Graph.java:118) at org.tensorflow.Graph.importGraphDef(Graph.java:102) at org.tensorflow.contrib.android.TensorFlowInferenceInterface.load(TensorFlowInferenceInterface.java:402) at org.tensorflow.contrib.android.TensorFlowInferenceInterface.initializeTensorFlow(TensorFlowInferenceInterface.java:91) at org.tensorflow.demo.TensorFlowImageClass</code></p>