You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I kept getting the below error when trying to execute dcgan.py file, when trying to execute in Colab
ImportError: cannot import name 'BatchNormalization' from 'keras.layers.normalization'
To over come this replace in the initial inclusions from line no 1 to 8 as below with Tensorflow
For line no 1 from tensorflow.keras.models import Sequential
For line no 2:8 replace it with from tensorflow.keras.layers import ( BatchNormalization, SeparableConv2D, MaxPooling2D, Activation, Flatten, Dropout, Dense, UpSampling2D,Reshape,Conv2D )
For line no 9 replace with from tensorflow.keras.optimizers import SGD
For line no 10 replace with from tensorflow.keras.datasets import mnist
Hope this helps!
Regards,
Mritula
The text was updated successfully, but these errors were encountered:
Hi, I kept getting the below error when trying to execute dcgan.py file, when trying to execute in Colab
ImportError: cannot import name 'BatchNormalization' from 'keras.layers.normalization'
To over come this replace in the initial inclusions from line no 1 to 8 as below with Tensorflow
For line no 1 from tensorflow.keras.models import Sequential For line no 2:8 replace it with from tensorflow.keras.layers import ( BatchNormalization, SeparableConv2D, MaxPooling2D, Activation, Flatten, Dropout, Dense, UpSampling2D,Reshape,Conv2D ) For line no 9 replace with from tensorflow.keras.optimizers import SGD For line no 10 replace with from tensorflow.keras.datasets import mnist
Hope this helps!
Regards, Mritula
Hi,
First of all, you must first ensure that you have Python 3.5 installed before installing tensorflow==1.0.0 (tensorflow-gpu==1.0.0) and keras==2.0.2. Then you have to make sure to get h5py and Pillow through pip install. You're ready to go once you've completed these steps.
Hi,
I kept getting the below error when trying to execute dcgan.py file, when trying to execute in Colab
ImportError: cannot import name 'BatchNormalization' from 'keras.layers.normalization'
To over come this replace in the initial inclusions from line no 1 to 8 as below with Tensorflow
For line no 1
from tensorflow.keras.models import Sequential
For line no 2:8 replace it with
from tensorflow.keras.layers import ( BatchNormalization, SeparableConv2D, MaxPooling2D, Activation, Flatten, Dropout, Dense, UpSampling2D,Reshape,Conv2D )
For line no 9 replace with
from tensorflow.keras.optimizers import SGD
For line no 10 replace with
from tensorflow.keras.datasets import mnist
Hope this helps!
Regards,
Mritula
The text was updated successfully, but these errors were encountered: