https://stackoverflow.com/questions/55266154/pytorch-preferred-way-to-copy-a-tensor Use .clone().detach() (or preferrably .detach()....