Skip to content

Instantly share code, notes, and snippets.

@cafielo
Created October 31, 2017 15:29
Show Gist options
  • Save cafielo/49844eabf1b8c1a7bd0b885e61197167 to your computer and use it in GitHub Desktop.
Save cafielo/49844eabf1b8c1a7bd0b885e61197167 to your computer and use it in GitHub Desktop.
1. Mnist load
from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten, Activation
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
from keras.layers.normalization import BatchNormalization
batch_size = 128
num_classes = 10
epochs = 10
# input image dimensions
img_rows, img_cols = 28, 28
# the data, shuffled and split between train and test sets
(x_train, y_train), (x_test, y_test) = mnist.load_data()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment