Your input might currently be too small for a resnet and you might get an error from a conv layer, explaining that the kernel size cannot be bigger than the input shape.
You could try to reshape it, such that the input channels are set to 1 and the spatial sizes are increased by a factor of 16 via:
x = x.view(x.size(0), 1, x.size(2)*16, x.size(3)*16) # [batch_size, 1, 32, 32]

And then change the input channels of the first conv layer to 1 via:
model.conv1 = nn.Conv2d(1, 64, 7, 2, 3, bias=False) # For torchvision.models.resnet18

This would at least increase the spatial size. Note that the default input shape is [3, 224, 224], so your input is still small compared to this shape.