Created
April 18, 2023 13:04
-
-
Save pythonlessons/60ce6967c8668ad0b134b3c930d73458 to your computer and use it in GitHub Desktop.
gan_introduction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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