#import necessary libraries import tensorflow as tf #load training data and split into train and test sets mnist = tf.keras.datasets.mnist (x_train,y_train), (x_test,y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0