From 8268b98b17dc5190eb5c12c914ff4ffcc504400b Mon Sep 17 00:00:00 2001 From: nunzip Date: Wed, 27 Feb 2019 18:50:58 +0000 Subject: Remove padding --- cgan.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cgan.py b/cgan.py index d44f961..7bef77c 100644 --- a/cgan.py +++ b/cgan.py @@ -203,11 +203,6 @@ class CGAN(): labels_test[i*100:] = i train_data = self.generator.predict([noise_train, labels_train]) test_data = self.generator.predict([noise_test, labels_test]) - test_data = np.pad(test_data, ((0,0),(2,2),(2,2),(0,0)), 'constant') - train_data = np.pad(train_data, ((0,0),(2,2),(2,2),(0,0)), 'constant') - labels_test = labels_test.flatten() - labels_train = labels_train.flatten() - print(train_data.shape, test_data.shape, labels_test.shape, labes_train.shape) return train_data, test_data, labels_train, labels_test -- cgit v1.2.3 From f5e7e167119dff9e2bae122f44fc2172b0cae14b Mon Sep 17 00:00:00 2001 From: nunzip Date: Wed, 27 Feb 2019 19:20:17 +0000 Subject: Fix y_test format bug --- lenet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lenet.py b/lenet.py index 982cd7e..4752fc3 100644 --- a/lenet.py +++ b/lenet.py @@ -20,6 +20,7 @@ def import_mnist(): X_test, y_test = mnist.test.images, mnist.test.labels y_train = keras.utils.to_categorical(y_train, 10) y_validation = keras.utils.to_categorical(y_validation, 10) + y_test = keras.utils.to_categorical(y_test, 10) return X_train, y_train, X_validation, y_validation, X_test, y_test def plot_images(images, cls_true, cls_pred=None): -- cgit v1.2.3