aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-02-27 20:39:22 +0000
committerVasil Zlatanov <v@skozl.com>2019-02-27 20:39:22 +0000
commit3f7889e7823017acb9dcfa53c6c60f899a37a05c (patch)
tree8cea8b786958adf4a2132d8ff33012c160bc1767
parentdf27559be9df36d14fe0b9e6bc389fa337b2c491 (diff)
parent765a74824171f9c3d1ab80d561debf2053c3dc06 (diff)
downloade4-gan-3f7889e7823017acb9dcfa53c6c60f899a37a05c.tar.gz
e4-gan-3f7889e7823017acb9dcfa53c6c60f899a37a05c.tar.bz2
e4-gan-3f7889e7823017acb9dcfa53c6c60f899a37a05c.zip
Merge branch 'master' of skozl.com:e4-gan
-rw-r--r--cgan.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/cgan.py b/cgan.py
index 7bef77c..eb0dbc3 100644
--- a/cgan.py
+++ b/cgan.py
@@ -193,17 +193,23 @@ class CGAN():
plt.close()
def generate_data(self):
- noise_train = np.random.normal(0, 1, (60000, 100))
+ noise_train = np.random.normal(0, 1, (55000, 100))
noise_test = np.random.normal(0, 1, (10000, 100))
+ noise_val = np.random.normal(0, 1, (5000, 100))
- labels_train = np.zeros(60000).reshape(-1, 1)
+ labels_train = np.zeros(55000).reshape(-1, 1)
labels_test = np.zeros(10000).reshape(-1, 1)
+ labels_val = np.zeros(5000).reshape(-1, 1)
+
for i in range(10):
- labels_train[i*600:] = i
- labels_test[i*100:] = i
+ labels_train[i*5500:] = i
+ labels_test[i*1000:] = i
+ labels_val[i*500:] = i
+
train_data = self.generator.predict([noise_train, labels_train])
test_data = self.generator.predict([noise_test, labels_test])
- return train_data, test_data, labels_train, labels_test
+ val_data = self.generator.predict([noise_val, labels_val])
+ return train_data, test_data, val_data, labels_train, labels_test, labels_val
'''