Setting set_detect_anomaly doesn’t give any other output

Make sure to use latest pytorch as we recently fix warnings not showing up in colab.
Or run your code in command line to have the corresponding forward code.
The code does quite a lot of inplace and viewing ops.

Plus, it is working without any error, when Pytorch is downgraded to 1.5.0.

This kind of check is here to make sure we don’t compute silently wrong gradients. So it is most likely that the old behavior was silently computing wrong gradients and has been fixed in more recent versions.