Skip to content

Instantly share code, notes, and snippets.

@emuccino
Created July 1, 2020 04:01
Show Gist options
  • Save emuccino/9b454a1c9851005920618fa4d48381f2 to your computer and use it in GitHub Desktop.
Save emuccino/9b454a1c9851005920618fa4d48381f2 to your computer and use it in GitHub Desktop.
from tensorflow.keras.datasets import mnist
#load mnist data
(x_train,y_train),(x_test,y_test) = mnist.load_data()
#reshape and scale input image data
x_train, x_test = (x.reshape(*x.shape,1)/x.max() for x in (x_train,x_test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment