Context: I have trained a model which consist in an image classifier.This model consist in a TF CNN and has been trained online (with google colaboratory) I then downloaded it as a tf.savemodel object. I would like to deploy this trained model on a PyQt5 Desktop app.
Problem: When I try to load my trained model in my code in PyCharm (2020.1.3) I get the following error :
ValueError: invalid literal for int() with base 10: 'class_name'
During handling of the above exception, another exception occurred:
ValueError: Error converting shape to a TensorShape: invalid literal
for int() with base 10: 'class_name'.
code used to load model:
model1=tf.keras.models.load_model(r'C:\Users\user\Desktop\UNI\L3\saved_models\model7')
SIDE NOTE: When I run the same line on colab the model is successfully loaded into the notebook.
Questions:
-What does the error mean?
-Why does it work on colab and not in my IDE?
-How can I fix this in order to load and use the trained model in my app ?