Menu

Exploring the Dataset

Exploring the Dataset

Before training the model, inspect the dataset.

Code

print(X_train.shape)
print(X_test.shape)
print(y_train.shape)
print(y_test.shape)

Explanation

This displays:

  • Number of training images
  • Number of testing images
  • Shape of the images
  • Shape of the labels

Exploring the dataset helps verify that it has been loaded correctly.