-
-
Save Sanlap1997/7de846fb089a5f7731c6b76d8c4e6014 to your computer and use it in GitHub Desktop.
This file contains 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 | |
import numpy as np | |
print("TensorFlow's version is", tf.__version__) | |
print("Keras' version is", tf.keras.__version__) | |
# Normalize training and testing pixel values | |
X_train_normalized = X_train / 255 - 0.5 | |
X_test_normalized = X_test / 255 - 0.5 | |
# Convert class vectors to binary class matrices. | |
Y_train_coded = tf.keras.utils.to_categorical(Y_train, NUM_CLASSES) | |
Y_test_coded = tf.keras.utils.to_categorical(Y_test, NUM_CLASSES) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment