Yes, detach doesn’t create copies and should only prevent the gradients to be computed but shares the data. So in your case, the detach in clone().detach() should maybe be also redundant except that you save computational resources by not updating the detached variable.