@melody it is because of NaN values appearing in your inputs to MaxPooling. If your training is stable and you dont get nans, then it will work fine. Regardless, I have fixed this in master via: https://github.com/pytorch/pytorch/commit/a6876a4783ce3d1bb3c6ba69f54c31983097ed17 260