Discussions>ValueError: Unknown layer: Interp>

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
3 votesLP262.00
1 Answers

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})

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?