Converts the given image to the numpy array for ResNets.
Note that you have to call this method before __call__
because the pre-trained resnet model requires to resize the given
image, covert the RGB to the BGR, subtract the mean,
and permute the dimensions before calling.
image (PIL.Image or numpy.ndarray) – Input image.
If an input is numpy.ndarray, its shape must be
or (channels,height,width), and
the order of the channels must be RGB.
size (pair of ints) – Size of converted images.
If None, the given image is not resized.