If the image doesn't need to be padded, don't copy it
If the image doesn't need to be resized, don't do an identity resize
For small inputs where both spatial dimensions are smaller than the model's
input we'll need to pad but not resize. For large inputs where the opposite is
true we'll need to resize but not pad. For medium inputs where one dim exceeds
the corresponding model input size and the other is smaller, we'll need to do
both.
Remove a copy that is sometimes redundant:
For small inputs where both spatial dimensions are smaller than the model's input we'll need to pad but not resize. For large inputs where the opposite is true we'll need to resize but not pad. For medium inputs where one dim exceeds the corresponding model input size and the other is smaller, we'll need to do both.