From 240be62b504dbdcb0cadcaf313d111eefe9ceea0 Mon Sep 17 00:00:00 2001 From: nunzip Date: Fri, 8 Mar 2019 12:17:11 +0000 Subject: Fix issue with produced labels --- cdcgan.py | 6 +++--- cgan.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cdcgan.py b/cdcgan.py index dba6737..8d59a03 100755 --- a/cdcgan.py +++ b/cdcgan.py @@ -229,9 +229,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]) diff --git a/cgan.py b/cgan.py index 68bb2cc..d27b11b 100755 --- a/cgan.py +++ b/cgan.py @@ -204,9 +204,9 @@ class CGAN(): 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]) -- cgit v1.2.3-54-g00ecf