ValueError: Expected more than 1 spatial element when training, got input size torch.Size([32, 165, 1, 1])

ValueError: Expected more than 1 spatial element when training, got input size torch.Size([32, 165, 1, 1])

I don’t know which layer you are using raising this error, but it expects an input with more than a single pixel to e.g. calculate stats of this input activation. Increase the spatial size of your input and it should work.