All resnets start with Conv2d layer, expecting tensor with predefined shape (batch_num, num channels, H, W). You can pass images with arbitrary shape, yes, but it has to be same shape (HxW) for all images.