NeuralLog icon indicating copy to clipboard operation
NeuralLog copied to clipboard

Provided trained models can't be loaded

Open drzanis opened this issue 2 years ago • 0 comments

Hello,

Could you let me know, how to load the pre-trained models provided by you using Keras (as you used). As I tried to load the models but get the error

from tensorflow.keras.models import load_model
model = load_model('demo/hdfs_transformer.hdf5') 

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-45-62ca9a14609d>", line 1, in <module>
    model = keras.models.load_model('demo/hdfs_transformer.hdf5')
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py", line 207, in load_model
    compile)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 181, in load_model_from_hdf5
    raise ValueError('No model found in config file.')
ValueError: No model found in config file.

drzanis avatar Feb 17 '23 16:02 drzanis