OSError: Unable to open file (File signature not found), while loading keras model saved in h5 format

0

I have a keras model saved by the name 'synthetic_pmate.h5' however, I'm not able to load the model when using keras' load_model function.

The kernel dies on executing the code below in a console and I get an exit code of 1073740940 (0xC0000374) on running it on pyCharm.

from keras.models import load_model
model = load_model('synthetic_pmate.h5')

There doesn't seem to be any issue in the path.

Also I tried to do the same with Tensorflow.

model = tf.keras.models.load_model('synthetic_pmate.h5')

But the kernel keeps dying. I'm using keras version 2.2.4 and Tensorflow version 1.10.0. I'm using python 3.6.7.

By the way I tried to execute the above code on a separate system, and the code runs there without any errors. Is this problem native to my system only, and if so, do I need to install or update something separately?

An update-- The OSError might be because the model was not saved properly, but even after saving the model in a proper format, I continue to face difficulty in loading the model as stated in the above code.

keras
h5py
asked on Stack Overflow Feb 18, 2019 by Ashu • edited Feb 19, 2019 by Ashu

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0