InceptionTime icon indicating copy to clipboard operation
InceptionTime copied to clipboard

OSError: SavedModel file does not exist at: {myFolde}/InceptionTime/results/inception/TSC/Coffee/best_model.hdf5/{saved_model.pbtxt|saved_model.pb}

Open Diogodhs opened this issue 4 years ago • 3 comments

Hello. I have a problem to run python3 main.py InceptionTime

My configuration:

Ubuntu 18.04 tensorflow 1.14.0 tensorflow-gpu 2.2.0 numpy 1.19.5 Keras 2.4.3 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.2

I follow the instruction to the basic running, however I found the following Error:

iter 0 dataset_name: Coffee Already_done {myFolder}/InceptionTime/results/inception/TSC/ Coffee dataset_name: Meat Already_done {myFolder}/InceptionTime/results/inception/TSC/ Meat iter 1 dataset_name: Coffee Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_1/ Coffee dataset_name: Meat Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_1/ Meat iter 2 dataset_name: Coffee Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_2/ Coffee dataset_name: Meat Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_2/ Meat iter 3 dataset_name: Coffee Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_3/ Coffee dataset_name: Meat Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_3/ Meat iter 4 dataset_name: Coffee Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_4/ Coffee dataset_name: Meat Already_done {myFolder}/InceptionTime/results/inception/TSC_itr_4/ Meat dataset_name: Coffee Traceback (most recent call last): File "main.py", line 138, in fit_classifier() File "main.py", line 49, in fit_classifier classifier.fit(x_train, y_train, x_test, y_test, y_true) File "{myFolder}/InceptionTime/classifiers/nne.py", line 75, in fit return_df_metrics=False) File "{myFolder}/InceptionTime/classifiers/inception.py", line 154, in predict model = keras.models.load_model(model_path) File "{myFolder}/InceptionTime/venv/lib/python3.6/site-packages/tensorflow/python/keras/saving/save.py", line 189, in load_model loader_impl.parse_saved_model(filepath) File "{myFolder}/InceptionTime/venv/lib/python3.6/site-packages/tensorflow/python/saved_model/loader_impl.py", line 113, in parse_saved_model constants.SAVED_MODEL_FILENAME_PB)) OSError: SavedModel file does not exist at: {myFolder}/InceptionTime/results/inception/TSC/Coffee/best_model.hdf5/{saved_model.pbtxt|saved_model.pb}

Looks like it's not saving the model to load later.

Diogodhs avatar Mar 21 '21 23:03 Diogodhs

same issue here

Nathan903 avatar Jun 01 '22 21:06 Nathan903

Hello,

This is an issue of OS because as you can see in this line here that the author used the + operation to join paths, which lead to create an empty space when saving the model TSC/ Coffee and loading with TSC/Coffee, so to fix that the os.path.join function in python should be used instead.

I think this might be the source of the problem, if you could try it and let me know it would be great.

Thank you.

hadifawaz1999 avatar Jun 02 '22 08:06 hadifawaz1999

@hfawaz

hadifawaz1999 avatar Mar 17 '23 20:03 hadifawaz1999