Skip to content

Commit afce7fb

Browse files
committed
fix perceptron
1 parent d9621e4 commit afce7fb

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

examples/keras-sign/perceptron.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,9 @@
2626
y_test = np_utils.to_categorical(y_test)
2727
num_classes = y_train.shape[1]
2828

29-
# you may want to normalize the data here..
30-
31-
# normalize data
32-
X_train = X_train.astype('float32') / 255.
33-
X_test = X_test.astype('float32') / 255.
34-
3529
# create model
3630
model = Sequential()
37-
model.add(Reshape((img_width, img_height, 1), input_shape=(img_width, img_height)))
38-
model.add(Conv2D(32, (3,3), activation="relu"))
39-
model.add(MaxPooling2D())
40-
model.add(Dropout(0.25))
41-
model.add(Conv2D(64, (3,3), activation="relu"))
42-
model.add(MaxPooling2D())
4331
model.add(Flatten())
44-
model.add(Dropout(0.25))
45-
model.add(Dense(100, activation="relu"))
46-
model.add(Dropout(0.25))
4732
model.add(Dense(num_classes, activation="softmax"))
4833
model.compile(loss=config.loss, optimizer=config.optimizer,
4934
metrics=['accuracy'])

0 commit comments

Comments
 (0)