Fashion MNIST with Keras

4 / 4

Divide the Dataset into Training and Validation Set

Now we will divide the dataset into training and validation set.

INSTRUCTIONS
  • Keep the first 5000 samples as validation set, the rest should be the training set. We also scale the pixel intensities down to the 0-1 range and convert them to floats, by dividing by 255.

    X_valid, X_train = X_train_full[:<< your code goes here >>] / 255., X_train_full[<< your code goes here >>:] / 255.
    
  • Now divide the y_train_full variable accordingly:

    y_valid, y_train = y_train_full[:<< your code goes here >>], y_train_full[<< your code goes here >>:]
    
  • Finally, convert the X_test variable by dividing by 255.

    X_test = << your code goes here >> / 255.
    


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

Loading comments...