ValueError: Unknown layer: Interp

I'm using keras 2.1.* and created a model with custom layer. Training process works fine, but when I want to load and use the model, it gives this error

ValueError: Unknown layer: Interp
kerascustom-layer
3 votesLP185.00
1 Answers
JW229.00
2

It's because of keras can't find an unknown implementation of any layer. Keras saves weights and some other parameters for layers, but it does not save the code and custom actions, that's why you should use custom_objects argument.

model = keras.models.load_model('model.h5', custom_objects={'Interp': Interp})
Reply
LP185.00
0

Oh, great. You saved my time. It works now. Thanks

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?