I have a question with Tensor copy, what I want is allocate the memory for a tensor outside a loop, and fill the data inner loop, but if I use c[batchId, :, :] = t3.t(), this seems a in plane operation(not differentiable), but if I use c[batchId, :, :].data = t3.().clone(), c is not change after the loop.

is there anyone could help me with the issue? thank you!