It looks like the channel dimension is missing in your input.
nn.Conv2d expects an input of the shape [batch_size, channels, height, width].
I assume you are dealing with grayscale images, thus the channel is missing.
To fix this issue, you could simply unsqueeze the missing dimension using:
images = images.unsqueeze(1)
outputs = model(images)