cur_z_arr[j].grad is None after when the code is executed. I don't know why. I also tried cur_z_arr[j].retain_grad() right before energy.backward()
1.4m articles
1.4m replys
5 comments
57.0k users