Hi,
This happens because one of your parameters (leaf Tensor that requires grad) has been modified inplace. Or rather a view of that Tensor has been modified inplace.
I am not sure exactly where you do that in your code but you will have to remove this inplace op.
If you run from python, you can enable the anomaly mode to get the more information about where the error comes from.