Thanks for your answer Simon. This is strange, since I installed pytorch 0.2.0 from anaconda, ran the snippet, got NaN, updated reduce.py, ran the snippet again and got 3. Anyway, that is not my main concern actually. Thanks for your suggestion, I’ll try it and report back