So even if I try to have a tensor x1 and x2 with gradient and replace their values with new values from the preprocessXXX, it is still impossible for the gradients to flow back?
Do you have any suggestion for this case because I had to turn the tensor to numpy and put the loop into numba to save time. If there is anyway to speed up the nested loop ut preserve the gradient please letme know! I’m kinda desperate right now