LogIntelligence / NeuralLog

Log-based Anomaly Detection Without Log Parsing (ASE 2021, Research Track)
MIT License
107 stars 36 forks source link

Provided trained models can't be loaded #6

Open ZanisAli opened 1 year ago

ZanisAli commented 1 year ago

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.