1. First step in Keras: classifying handwritten digits (MNIST)
The usage of Tensorboard/ ModelCheckpoint for training and saving different models
- One input layer + one Dense layer + one output layer(softmax)
Corssentropy loss + Adam optimizer + no normalization
-
Same model with normalization (lamda layer)
-
Two hidden layers (Dense+relu) + One output layer (softmax)
-
add regularizer (in the base of the model below)
- L2 penality
x = Dense(256,kernel_regularizer=regularizers.l2(1e-5))(xl)
Test loss: 0.158592546591 Test accuracy: 0.9762
- Dropout
x = Dense(hidden1)(x)
x = Activation('relu')(x)
x = Dropout(0.5)(x)
Test loss: 0.0925885819901 Test accuracy: 0.9746
A Friendly Introduction to Cross-Entropy Loss