Hi there,
do you know if there is a way to convert variable to list of variables without breaking Autograd?
for example, I have variable T whose shape is (3,5), and T.require_grad is True. Now I want to convert T to a list of list. I know I could use T.data.tolist(), but this will break the autograd computation graph. I also do not want to do two for loops to get the elements from T and put them into the list one by one since the efficiency would be very bad.
Is there anyone know how to do this efficiently without breaking the Autograd?
Thanks!