I get this error: “RuntimeError: non-empty 3D or 4D (batch mode) tensor expected for input” when passing a tensor of shape [1, 2, 3, 256, 256] to the layer AvgPool2d(kernel_size=3, stride=2, padding=[1, 1]).
I could not figure out what the problem is. From the research I have done it seems that this error is thrown when an empty tensor is passed to the pooling layer but the shape of my tensor is [1, 2, 3, 256, 256] meaning its not empty. Am I missing something? Thanks in advance.