TransWikia.com

The added layer must be an instance of class Layer. Found:

Data Science Asked by Alvi Rahman on January 27, 2021

I don’t know why BatchNormalization is giving the following error. Googled out but couldn’t find any relevant answers

My code appears to be this:

Code Snippet

One Answer

How did you import "BatchNormalization" layer? I had the same error and the solution was changing the way I was importing:

from tensorflow.keras.layers import Activation, Dropout, Dense, Conv2D, Flatten, Dropout, MaxPooling2D, BatchNormalization

I put the BatchNormalization with all the other layers, and it work in my case.

Hope it is useful.

Answered by Paula on January 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP