Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Diogodhs opened this issue Mar 21, 2021 · 3 comments

Comments

@Diogodhs
Copy link

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.

@Nathan903
Copy link

same issue here

@hadifawaz1999
Copy link
Collaborator

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
Copy link
Collaborator

@hfawaz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants