Hi,
You can copy into a Tensor in a differentiable way with param.copy_(pi).
The problem is that Parameters are leafs (they never have history) so you won’t be allowed to do this.
If you don’t want them to be Parameters anymore and want them to have history, you can simply delete the existing parameter del net.foo and set a plain Tensor to replace it net.foo = your_tensor.