If it’s not a multiple of 32, you will lose some values in the intermediate layers due to having odd sizes of tensors. That may or may not be a problem for the problem you are solving, but in general, it would be better to resample the images to at least 32x32 if you wish to use unmodified resnet18 architecture.