ValueError: Unknown layer: Addons>InstanceNormalization

72 Views Asked by At

I tried to load my weight into my model, but i got the following the error.

ValueError: Unknown layer: Addons>InstanceNormalization

I have already search for similar problems, the error they got as follow.

ValueError: Unknown layer: InstanceNormalization

ValueError: Unknown layer: CapsuleLayer

ValueError: Unknown layer: Custom>CTCLayer. Please ensure this object is passed to the custom_objects argument

Most of the answers told them to add the custom layer you used in custom_objects in keras.models.load_model(), such as

keras.models.load_model(weight_path, custom_objects={'InstanceNormalization': InstanceNormalization})

However, that does not solve my problem. Another method i tried also not solve it.

with CustomObjectScope({'InstanceNormalization': InstanceNormalization}):
    gan_model = load_model(gan_model_path)

I am using tensorflow 2.0, tensorflow-addons 0.6.0 and keras 2.3.1 .

0

There are 0 best solutions below