I have defined a custom layer named CapsuleLayer
. The actual model has been defined in a separate class. I have loaded the weights into the actual model and have saved the model in an .h5
file. However when I try to load the model using load_model(filepath)
I get the error
ValueError: Unknown layer: CapsuleLayer
How can I incorporate the custom layer into my model while loading the saved model.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…