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
I'm trying to run the DCGAN from chapter 5; the code performs well and the generated images are good.
But when I change the source code so that it becomes compatible with tf.keras rather than keras, the model produces useless images that are obviously just noise
The following is the only bit of the code I've changed. From:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from keras.datasets import mnist
from keras.layers import Activation, BatchNormalization, Dense, Dropout, Flatten, Reshape
from keras.layers import LeakyReLU
from keras.layers import Conv2D, Conv2DTranspose
from keras.models import Sequential
from keras.optimizers import Adam
to:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.keras.datasets import mnist
from tensorflow.keras.layers import Activation, BatchNormalization, Dense, Dropout, Flatten, Reshape
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.layers import Conv2D, Conv2DTranspose
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
I've even tried to enforce tf_1 compatability with
tf.compat.v1.disable_v2_behavior()
but performance remains poor. Any ideas?
The text was updated successfully, but these errors were encountered:
I'm trying to run the DCGAN from chapter 5; the code performs well and the generated images are good.
But when I change the source code so that it becomes compatible with tf.keras rather than keras, the model produces useless images that are obviously just noise
The following is the only bit of the code I've changed. From:
to:
I've even tried to enforce tf_1 compatability with
tf.compat.v1.disable_v2_behavior()
but performance remains poor. Any ideas?
The text was updated successfully, but these errors were encountered: