diff options
Diffstat (limited to 'cdcgan.py')
-rwxr-xr-x | cdcgan.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -156,7 +156,6 @@ class CDCGAN(): # Sample noise as generator input noise = np.random.normal(0, 1, (batch_size, 100)) - tf.keras.backend.get_session().run(tf.global_variables_initializer()) # Generate a half batch of new images gen_imgs = self.generator.predict([noise, labels]) @@ -224,9 +223,9 @@ class CDCGAN(): labels_val = np.zeros(5000).reshape(-1, 1) for i in range(10): - labels_train[i*5500:] = i - labels_test[i*1000:] = i - labels_val[i*500:] = i + labels_train[i*5500:-1] = i + labels_test[i*1000:-1] = i + labels_val[i*500:-1] = i train_data = self.generator.predict([noise_train, labels_train]) test_data = self.generator.predict([noise_test, labels_test]) |