(image, target_size)
return resized_image
Resize image to target size

    Args:
        image (numpy.ndarray): Image of shape (C x H x W).
        target_size (tuple): Target size (H, W).

    Returns:
        numpy.ndarray: Resized image of shape (C x H x W).
Resize image to target size
Resize image to target size
def resize_image(image, target_size):
    """Resize image to target size

    Args:
        image (numpy.ndarray): Image of shape (C x H x W).
        target_size (tuple): Target size (H, W).

    Returns:
        numpy.ndarray: Resized image of shape (C x H x W).

    """
    n_channels = image.shape[0]
    resized_image = resize(image, (n_channels, target_size[0], target_size[1]), mode='constant')
    return resized_image
def resize_image ( image , target_size ) : n_channels = image . shape [ 0 ] resized_image = resize ( image , ( n_channels , target_size [ 0 ] , target_size [ 1 ] ) , mode = 'constant' ) return resized_image