Tensorflow lite Model with metada stops of working

I used transfer learning to train my model.
I want to use it on mobile devices, so I tried to import it on iOS, but I was getting errors because my model didn’t have any metadata.

I added the metadata by using this notebook

But now, all my predictions are wrong. I always get the same result: the first five categories with low probability.
Before, my model worked, but now it’s broken.
Any ideas about what I am doing wrong?

@dobleuber,

Welcome to the Tensorflow Forum!

Could you please share the standalone code/notebook to reproduce the issue reported above?

Thank you!

Sorry, but I don’t understand you.
Do you want my Swift code and trained model to reproduce the issue?
This is my test notebook. I always got the same result

The process of adding the metadata to my trained model is ok?