MadmanNero:

Why do I have to detach those two tensors when passing to loss function? Is that correct?


No. That means no training. You actually want to detach data (if it requires gradient) but not output.
Best regards
Thomas