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()
question from:https://stackoverflow.com/questions/65880786/grad-is-none-after-backwardcur_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()
question from:https://stackoverflow.com/questions/65880786/grad-is-none-after-backward