Skip to content

Commit fe17b13

Browse files
committed
fix bug
1 parent a85d6ab commit fe17b13

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

kerasTUT/5-classifier_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
(X_train, y_train), (X_test, y_test) = mnist.load_data()
2424

2525
# data pre-processing
26-
X_train = X_train.reshape(X_train.shape[0], -1) / 255 # normalize
27-
X_test = X_test.reshape(X_test.shape[0], -1) / 255 # normalize
26+
X_train = X_train.reshape(X_train.shape[0], -1) / 256. # normalize
27+
X_test = X_test.reshape(X_test.shape[0], -1) / 256. # normalize
2828
y_train = np_utils.to_categorical(y_train, nb_classes=10)
2929
y_test = np_utils.to_categorical(y_test, nb_classes=10)
3030

kerasTUT/7-RNN_Classifier_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
(X_train, y_train), (X_test, y_test) = mnist.load_data()
3838

3939
# data pre-processing
40-
X_train = X_train.reshape(-1, 28, 28) / 255 # normalize
41-
X_test = X_test.reshape(-1, 28, 28) / 255 # normalize
40+
X_train = X_train.reshape(-1, 28, 28) / 256. # normalize
41+
X_test = X_test.reshape(-1, 28, 28) / 256. # normalize
4242
y_train = np_utils.to_categorical(y_train, nb_classes=10)
4343
y_test = np_utils.to_categorical(y_test, nb_classes=10)
4444

0 commit comments

Comments
 (0)