Because you modify inplace a Tensor that is needed for backward.
So you should use anomaly mode to get more informations. And remove the corresponding inplace (or add a clone() to make sure the saved Tensor itself is not modified).