<p dir="auto">Below is the error:</p>
<p dir="auto">Exception in thread "main" java.lang.UnsupportedOperationException: Op BatchNormWithGlobalNormalization is not available in GraphDef version 21. It has been removed in version 9. Use tf.nn.batch_normalization().<br>
at org.tensorflow.Graph.importGraphDef(Native Method)<br>
at org.tensorflow.Graph.importGraphDef(Graph.java:113)<br>
at org.tensorflow.Graph.importGraphDef(Graph.java:97)<br>
at org.tensorflow.examples.LabelImage.executeInceptionGraph(LabelImage.java:110)<br>
at org.tensorflow.examples.LabelImage.main(LabelImage.java:65)</p>
<p dir="auto">I can't find the source file in which to use tf.nn.batch_normalization<br>
Are the Java libraries using older versions of Tensorflow?</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>