-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RuntimeError: Trying to backward through the graph a second time #1379
Comments
Hi, @FrancescoSaverioZuppichini , You can modify the config like this optimizer_config = dict(type="GradientCumulativeOptimizerHook", cumulative_iters=4) |
Super! Thank you. @zhouzaida would it make sense to add an example in the doc to avoid this confusion? |
yet, great suggestion. We have a plan to add more examples or tutorials about how to use all of the hooks like OptimizerHook or GradientCumulativeOptimizerHook |
Hi @zhouzaida I replaced However, I obtain the following error: How can I change the Hook from the Thanks already in advance for your help! |
Hi @xiviax , could you provide the versions of mmcv and mmdet? |
Hi @zhouzaida |
It seems like you set the fp16 like here so |
Ah I see! This is the config that I used:
I just saw that there is also a
Could the Thanks already in advance for your answer! |
Hi, you need to remove this line from config. |
Great. It seems to be working now. Thank you so much for your support! |
Hi @zhouzaida. I run mask r cnn on following config.But, doesn't work.
Detailed settings can be found here. |
Thanks for reporting the unexpected results and we appreciate it a lot.
Describe the Issue
GradientCumulativeOptimizerHook
doesn't work.Reproduction
Add
GradientCumulativeOptimizerHook
to your*_config.py
fileOutput
Environment
python -c "from mmcv.utils import collect_env; print(collect_env())"
Error traceback
If applicable, paste the error traceback here.
The text was updated successfully, but these errors were encountered: