<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>Load the model in the asset folder from here: <a href="http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz" rel="nofollow">http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz</a><br>
rather than here: <a href="https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip" rel="nofollow">https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip</a><br>
This step loads the model which is used in image_retrain, label_image and classify examples. The link for the model in the android demo is old and has some differences that don't work with the other demos as mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135792082" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1253" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1253/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1253">#1253</a></li>
<li>Change the input_width and input_mean in TensorflowImageListener.java</li>
<li>Change the input tensor name and output tensor name as follows in the tensorflow_jni.cc</li>
</ol>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li>I changed the input_width from 224 to 299 and input_mean from 117 to 128.</li>
<li>When the input tensor name was <strong>input:0</strong> and output tensor name was <strong>output:0</strong> I got the following node not found error</li>
</ol>
<p dir="auto"><code class="notranslate">02-23 23:56:11.066 15084-15105/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:271 Width: 299 02-23 23:56:11.066 15084-15105/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:272 Stride: 1196 02-23 23:56:11.066 15084-15105/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:176 Tensorflow: Copying Data. 02-23 23:56:11.070 15084-15105/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:194 Start computing. 02-23 23:56:11.157 15084-15105/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:205 End computing. Ran in 86ms (91ms avg over 7 runs) 02-23 23:56:11.157 15084-15105/org.tensorflow.demo E/native: tensorflow/examples/android/jni/tensorflow_jni.cc:210 Error during inference: Not found: FetchOutputs node output:0: not found</code></p>
<ol dir="auto">
<li>When the input tensor name was <strong>Mul:0</strong> and output tensor name was <strong>softmax:0</strong> I got the following error</li>
</ol>
<p dir="auto"><code class="notranslate">02-24 00:07:46.149 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:270 Height: 299 02-24 00:07:46.149 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:271 Width: 299 02-24 00:07:46.149 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:272 Stride: 1196 02-24 00:07:46.149 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:176 Tensorflow: Copying Data. 02-24 00:07:46.152 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:194 Start computing. 02-24 00:07:46.222 23093-23123/org.tensorflow.demo I/native: tensorflow/examples/android/jni/tensorflow_jni.cc:205 End computing. Ran in 70ms (77ms avg over 35 runs) 02-24 00:07:46.222 23093-23123/org.tensorflow.demo E/native: tensorflow/examples/android/jni/tensorflow_jni.cc:210 Error during inference: Invalid argument: No OpKernel was registered to support Op 'BatchNormWithGlobalNormalization' with these attrs [[Node: conv/batchnorm = BatchNormWithGlobalNormalization[T=DT_FLOAT, scale_after_normalization=false, variance_epsilon=0.001](conv/Conv2D, conv/batchnorm/moving_mean, conv/batchnorm/moving_variance, conv/batchnorm/beta, conv/batchnorm/gamma)]] </code></p>
<p dir="auto">That's good news that the android demo code is finding the nodes in the new model after the changes. However, I have no idea what this error means. I would really appreciate if someone can explain. (Although this issue is being taken care of in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135792082" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1253" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1253/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1253">#1253</a>, I am still doing it myself in an attempt to learn more about tensorflow)<br>
<code class="notranslate">No OpKernel was registered to support Op 'BatchNormWithGlobalNormalization' with these attrs [[Node: conv/batchnorm = BatchNormWithGlobalNormalization[T=DT_FLOAT, scale_after_normalization=false, variance_epsilon=0.001](conv/Conv2D, conv/batchnorm/moving_mean, conv/batchnorm/moving_variance, conv/batchnorm/beta, conv/batchnorm/gamma)]]</code></p>
<p dir="auto">Looking at the main.cc in the label_image example, I see something about "normalized" in the ReadTensorFromImage function. Don't know if that's helpful information.</p>
<p dir="auto">I could not find the documentation for tensorflow::ops::Const starting from the C++ API documentation. I figured out it is declared in ops/const_op.h, but there is no link from the main C++ docs:<br>
<a href="https://www.tensorflow.org/api_docs/cc/" rel="nofollow">https://www.tensorflow.org/api_docs/cc/</a></p>
<p dir="auto">A search returns this, but it looks orphaned:<br>
<a href="https://www.tensorflow.org/api_docs/cc/group/const-op" rel="nofollow">https://www.tensorflow.org/api_docs/cc/group/const-op</a></p>
<p dir="auto">So I guess there is something wrong in the docs.</p>