The error message
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.DoubleTensor [10, 8]], which is output 0 of SelectBackward, is at version 3; expected version 2 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
is already the output of the anomaly detection.
Are you referring to the x and y in the example? If my module works correctly these variables should be read-only, but I will double check. All other variables should be renewed by the second compilation step.
EDIT
I am now quite sure that x and y do not change. I copy both via tensor.clone() and compare them after calling my module. All other variables are renewed by calling model = MyFancyModel() the second time…