Skip to content

Instantly share code, notes, and snippets.

@vivekpadia70
Created March 30, 2020 08:35
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 vivekpadia70/5a704c08711da10cb45faa7ece505a65 to your computer and use it in GitHub Desktop.
Save vivekpadia70/5a704c08711da10cb45faa7ece505a65 to your computer and use it in GitHub Desktop.
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()
train_images = train_images.reshape(train_images.shape[0], 28, 28, 1).astype('float32')
train_images = (train_images - 127.5) / 127.5
train_dataset = tf.data.Dataset.from_tensor_slices(train_images).shuffle(60000).batch(256)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment