ibm-aur-nlp/EDD

code error

yang-chenyu104 opened this issue · 0 comments

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