Advertisement
rodolpheg

Untitled

Nov 23rd, 2020
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import pandas as pd
  2. import matplotlib.pyplot as plt
  3.  
  4. from tensorflow.keras.datasets import mnist
  5. (x_train,y_train), (x_test,y_test) = mnist.load_data()
  6. x_train.shape
  7. image_0 = x_train[0]
  8. plt.imshow(image_0)
  9.  
  10. from tensorflow.keras.utils import to_categorical
  11. y_cat_train = to_categorical(y_train)
  12. y_cat_test = to_categorical(y_test)
  13.  
  14. x_train = x_train / 255
  15. x_test = x_test / 255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement