Usually conv layers expect a 4 dimensional input where the first dimension is the batch dimension. If you are trying to pass a single image or example can you try something like x.unsqueeze(0) to add a batch dimension?