Project - Autoencoders for MNIST Fashion

2 / 6

Preparing the Dataset

  • Let us load the fashion mnist dataset from Keras data sets.

  • We shall then split the data into train, validation, and test parts.

INSTRUCTIONS
  • Load the train and test data using keras.datasets.fashion_mnist.load_data().

    (X_train_full, y_train_full), (X_test, y_test) = << your code comes here >>
    
  • Scale the X_train_full and X_test data sets with 255.

    X_train_full = X_train_full.astype(np.float32) / 255
    X_test = X_test.astype(np.float32) / 255
    
  • Slice the X_train_full, such that the last 5000 samples form the validation data X_valid and the remaining samples form the train data X_train.

    X_train, X_valid = << your code comes here >>[:-5000], << your code comes here >>[-5000:]
    
  • Similarly, slice the y_train_full, such that the last 5000 samples form the validation data labels y_valid and the remaining samples form the train data labels y_train.

    y_train, y_valid = << your code comes here >>[:-5000], << your code comes here >>[-5000:]
    
Get Hint See Answer


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...