nn.*2d layers expect a 4-dimensional input in the shape [batch_size, channels, height, width].
Based on the error message I guess the batch dimension might be missing and you can add it via:
x = x.unsqueeze(0)

before passing it to the model.