Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after loss.backward(),the weight's grad is none #4

Open
moonfighting opened this issue Apr 2, 2020 · 0 comments
Open

after loss.backward(),the weight's grad is none #4

moonfighting opened this issue Apr 2, 2020 · 0 comments

Comments

@moonfighting
Copy link

moonfighting commented Apr 2, 2020

When I calculate the loss and run loss.backward,
I found all the weights in the model's grad are None ,
the weights' value can't be updated

the sample codes is like:
`
features = model(input_data)

 loss = circle_loss(features, labels)

 loss.backward()

 for name, param in mode.named_parameters():

    print('name:', name,   "param_grad:', param.grad) # here all the param.grad is None

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant