Code: model = image_classifier.create(train_data, validation_data=validation_data, epochs= 10, learning_rate= 0.001, model_spec=model_spec.get(‘mobilenet_v2’))
OSError: SavedModel file does not exist at: C:\Users\Hagen\AppData\Local\Temp\tfhub_modules\145bb06ec3b59b08fb564ab752bd5aa222bfb50a{saved_model.pbtxt|saved_model.pb}
During the create method, model maker will use TensorFlow Hub to download the base model (in your case mobilenet_v2) to do transfer learning. Apparently, it thinks the model is there but it can find when loading.
you can also try this code snippet to see if this works fine on your machine:
import tensorflow as tf
import tensorflow_hub as hub
model = hub.load("https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4")
this is basically what Model Maker is doing when you get that error.
Thank you for the reply, I tried the code and it didn’t work. I also got the same error.
model = hub.load("https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4")
OSError: SavedModel file does not exist at: C:\Users\Hagen\AppData\Local\Temp\tfhub_modules\87f7b0d2504a48175f521bcaed174acabc93672c{saved_model.pbtxt|saved_model.pb}
There are assets and variables folder under the ‘87f7b0d2504a48175f521bcaed174acabc93672c’.
However there’s no saved_model.pbtxt or saved_model.pb.
The code was working the other day. I remember that I imported tensorboard 'cause I want to try if I can use tensorboard in tflite-model-maker. Since the tensorboard code did not work I removed few lines of codes related to tensorboard then the OSError appeared.
Just wanted to add I had this caching issue too, Windows 10 Version 19043, deleting the file forced it to re-save with the .pb file. Thanks for the above.