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

code error #4

Open
yang-chenyu104 opened this issue Apr 11, 2021 · 0 comments
Open

code error #4

yang-chenyu104 opened this issue Apr 11, 2021 · 0 comments

Comments

@yang-chenyu104
Copy link

when i run train_dual_decoder.py,an error occurred that RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
the code is "# Back prop.
if encoder_optimizer is not None:
encoder_optimizer.zero_grad()
if tag_decoder_optimizer is not None:
tag_decoder_optimizer.zero_grad()
if self.predict_content:
cell_decoder_optimizer.zero_grad()
if self.predict_bbox:
cell_bbox_regressor_optimizer.zero_grad()
loss.backward()"
How can i solve it?
Thanks your answer

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