Abnormal_Event_Detection icon indicating copy to clipboard operation
Abnormal_Event_Detection copied to clipboard

Reg: Loading Pre-trained model fails

Open ghost opened this issue 5 years ago • 5 comments

Hi All, I tested the model (i renamed the model.h5 to AnomalyDetector.h5 . Loading fails completely with an error TypeError: ('Keyword argument not understood:', 'implementation') Any suggestion will be highly appreciated.

Thank you Vivek

ghost avatar Mar 31 '19 14:03 ghost

I faced this same problem. I was working on Keras version 2.2.4.

Then I checked which keras version was used when model.h5 file was made by the owner. Keras 2.1.1 was used. You can verify it too

import h5py

f = h5py.File('Model.h5', 'r')
print(f.attrs.get('keras_version'))

Update to this version. It works fine.

You can check the version by running this: python -c 'import keras; print(keras.version)'

abhishekpopli avatar Apr 05 '19 18:04 abhishekpopli

i think model.h5 is not AnomalyDetector.h5.You can generate it by run train.y image

BelivLi avatar May 11 '19 12:05 BelivLi

abhishekpopli

I faced this same problem. I was working on Keras version 2.2.4. Then I checked which keras version was used when model.h5 file was made by the owner. Keras 2.1.1 was used. You can verify it too import h5py

f = h5py.File('Model.h5', 'r') print(f.attrs.get('keras_version'))

Update to this version. It works fine. You can check the version by running this: python -c 'import keras; print(keras.version)'

How to check the version of the h5 file using anaconda? Thank you in advance

ananya53255 avatar Dec 15 '19 05:12 ananya53255

Hey bro ,you know professor.py problem? i used keras version that is 2.0.8 and tensorflow version == 1.1.0

yingzi666-rise avatar Dec 27 '19 14:12 yingzi666-rise

Thank you good luck for you

yingzi666-rise avatar Dec 27 '19 14:12 yingzi666-rise