mdietrichstein / tensorflow-open_nsfw

Tensorflow Implementation of Yahoo's Open NSFW Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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?