def check_data_shape(self, data_shape):
    'Checks if the input data shape is valid'
    if (not (len(data_shape) == 3)):
        raise ValueError('data_shape should have length 3, with dimensions CxHxW')
    if (not (data_shape[0] == 3)):
        raise ValueError('This iterator expects inputs to have 3 channels.')
Checks if the input data shape is valid
def check_data_shape(self, data_shape):
    
    if (not (len(data_shape) == 3)):
        raise ValueError('data_shape should have length 3, with dimensions CxHxW')
    if (not (data_shape[0] == 3)):
        raise ValueError('This iterator expects inputs to have 3 channels.')