How would you resolve Expected nested_tensorlist[0].size( ) > 0 to be true, but got false using error using autograd.grad( )?
I am using pytorch to train a cnn on CIFAR10 but ysing autograd.grad( ) function to calculate the gradients for the backprop instead of .backward( ) I was having trouble with exploding gradients so I used clip_grad_value_( ) to tame them. This lead to the RuntimeError mentioned above. From searching online I didn't find any resolutions that involved .grad( ). Any suggestions to help resolve this issue? Thanks Traceback: --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /tmp/ipykernel_1898/1925958117.py in <cell line: 0>()
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.