Skip to content

Instantly share code, notes, and snippets.

@alik604
Created May 30, 2020 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alik604/14a04362a45b3b0fb7674a27757ed7b0 to your computer and use it in GitHub Desktop.
Save alik604/14a04362a45b3b0fb7674a27757ed7b0 to your computer and use it in GitHub Desktop.
# https://github.com/alik604/Notebooks/blob/master/Data%20Science-Datasets/MNIST/Where_to_add_GaussianNoise_MNIST_.ipynb
# data - MNIST
# note - test_size=0.98... ya...
model = Sequential()
model.add(Conv2D(filters=100, kernel_size=3)) # remove relu
# model.add(GaussianNoise(0.5)) # sandwich between
# GaussianNoise(0.5) here - accuracy: 0.9829 - val_loss: 0.4050 - val_accuracy: 0.9024
model.add(Activation('relu')) # add relu
# GaussianNoise(0.5) here - accuracy: 0.9900 - val_loss: 1.4703 - val_accuracy: 0.8073
model.add(MaxPooling2D(pool_size=(2, 2)))
# GaussianNoise(0.5) here - accuracy: 0.9721 - val_loss: 0.3031 - val_accuracy: 0.9356
model.add(BatchNormalization())
# GaussianNoise(0.5) here - accuracy: 1.0000 - val_loss: 0.1905 - val_accuracy: 0.9538
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment