In your code by default training=False, set training=True it will work right.

Also, since you are already subclassing keras.Model you don't need to again call keras.Model. Remove the model() method, pass the input directly to call() method by setting training=True.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.