Skip to content

Instantly share code, notes, and snippets.

@pythonlessons
Created April 18, 2023 13:04
Show Gist options
  • Select an option

  • Save pythonlessons/60ce6967c8668ad0b134b3c930d73458 to your computer and use it in GitHub Desktop.

Select an option

Save pythonlessons/60ce6967c8668ad0b134b3c930d73458 to your computer and use it in GitHub Desktop.
gan_introduction
import tensorflow as tf
from tensorflow.keras.datasets import mnist
# Load MNIST dataset
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# Normalize pixel values to [-1, 1]
x_train = (x_train.astype('float32') - 127.5) / 127.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment