When working with images in machine learning, knowing the image's shape, data type (dtype), and size is key. These properties help us understand the input data before training a model.
Shape tells us the image dimensions (height, width, color channels). This is important because models expect inputs of a certain size.
Dtype shows the type of data stored (like integers or floats). This affects how the image data is processed and stored in memory.
Size is the total number of elements (pixels times channels). It helps us know how much data the image holds.
Checking these properties ensures the model gets the right input format and helps avoid errors during training or prediction.