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

grad is None in squad example #43

Closed
vpegasus opened this issue Nov 20, 2018 · 2 comments
Closed

grad is None in squad example #43

vpegasus opened this issue Nov 20, 2018 · 2 comments

Comments

@vpegasus
Copy link

Hi, guys, I try the run_squad example with

Traceback (most recent call last):                                                                                                                                                                 | 0/7331 [00:00<?, ?it/s]
  File "examples/run_squad.py", line 973, in <module>
    main()
  File "examples/run_squad.py", line 904, in main
    param.grad.data = param.grad.data / args.loss_scale
AttributeError: 'NoneType' object has no attribute 'data'

I find one of the param.grads is None, so the param.grad.data doesn't exist.
by the way I down load the data by myself from the urls in this prject. my os is ubuntu 18.04, pytorch 0.41 gpu 1080t

anyone else encounters this situation?
wanna help, please, thx in advance...

@thomwolf
Copy link
Member

Oh you're right. I've just fixed that. you can try to pull the current master and test again.

@vpegasus
Copy link
Author

@thomwolf it works, thanks

stevezheng23 added a commit to stevezheng23/transformers that referenced this issue Mar 24, 2020
add span/label loss weight parameters for mt-roberta-qa
jameshennessytempus pushed a commit to jameshennessytempus/transformers that referenced this issue Jun 1, 2023
ocavue pushed a commit to ocavue/transformers that referenced this issue Sep 13, 2023
jonb377 pushed a commit to jonb377/hf-transformers that referenced this issue Nov 3, 2023
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

2 participants