Need help to run this model on android
ameerhamza6733 opened this issue · comments
I am trying to run this model on the Android device.i think I have made some mistake here can you please review these value and let me know I these values are correct or not
Error : E/TensorFlowInferenceInterface: Failed to run TensorFlow inference with inputs:[input], outputs:[predictions]
Please reply Thank you.
private const val INPUT_WIDTH = 224
private const val INPUT_HEIGHT = 224
private const val IMAGE_MEAN = 117
private const val IMAGE_STD = 1f
private const val INPUT_NAME = "input"
private const val OUTPUT_NAME = "predictions"
Make sure your android INPUT_NAME and OUTPUT_NAME should be the same of your training time name.
Yes it is same, Here is input layer name in the model
https://github.com/mdietrichstein/tensorflow-open_nsfw/blob/master/model.py#L34
output name : https://github.com/mdietrichstein/tensorflow-open_nsfw/blob/master/model.py#L107
Yes it is same, Here is input layer name in the model
https://github.com/mdietrichstein/tensorflow-open_nsfw/blob/master/model.py#L34
output name : https://github.com/mdietrichstein/tensorflow-open_nsfw/blob/master/model.py#L107
tensorflow/tensorflow#10153 (comment)
check this out
I use google colab to convert this model to tflie. Now when I run this tflite on my android device it always returns the first label with high probability any idea why?