UnboundLocalError: local variable 'l1_loss' referenced before assignment in Doctr's compute_loss function #1667
-
Bug descriptionWhile training a Doctr model with my own dataset, I encountered an UnboundLocalError in the compute_loss function of the differentiable_binarization module. Code snippet to reproduce the bug
Error traceback
EnvironmentCollecting environment information... DocTR version: 0.9.0a0 Nvidia driver version: 555.42.02 Deep Learning backend
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 17 replies
-
Hey @ep0p 👋, This will only happen if we couldn't build the target mask/s
|
Beta Was this translation helpful? Give feedback.
-
Hi @felixdittrich92, I am in the process of checking my dataset but it will take a while, i'll come back to you as soon as i find the issue. |
Beta Was this translation helpful? Give feedback.
-
Hi Guys! ..................... I solved the above error with the following change:
|
Beta Was this translation helpful? Give feedback.
-
Hi @felixdittrich92, thank you for your efforts. I appreciate it. I used CORD dataset, and I faced that error. But it works when I changed as i mentioned above.That is why I though it would be a solution. I never say I am surely true. I completely agree with your opinion. .............. |
Beta Was this translation helpful? Give feedback.
Hey @ep0p 👋,
This will only happen if we couldn't build the target mask/s
reasons for this: