Converts the given image to a numpy array for ResNet.
Note that this method must be called before calling forward,
because the pre-trained resnet model will resize the given
image, convert from RGB to 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.