googlecreativelab / teachablemachine-community

Example code snippets and machine learning code for Teachable Machine
https://g.co/teachablemachine
Apache License 2.0
1.51k stars 676 forks source link

different prediction results H5 File and TfLite File #153

Open staebchen0 opened 3 years ago

staebchen0 commented 3 years ago

Hello everybody,

for my project I created an h5 model Keras file with Teachable Machine, which also works well :-)

Since the prediction is faster with TF Lite, I also downloaded the model in Teachable as a model_unquant.tflite file.

The pictures basis of the two models is identical. Now I have found that the prediction with the model.tflite does not work well. The detection is not as good as with the h5 model, how can that be?

Does anyone have any idea why this could be? I would have expected the predictions of the models to be the same.

staebchen0 commented 3 years ago

can someone give me an answer to the question?

I've done a lot of tests in the meantime and the prediction result of the Kreas model and TF Lite floating point number is definitely different, although the data is based on the same.

After a training session, I downloaded a Kreas model and a TF Lite model