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 bugs in calculating lossess? #21

Closed
zachpvin opened this issue Jan 18, 2023 · 1 comment
Closed

Code bugs in calculating lossess? #21

zachpvin opened this issue Jan 18, 2023 · 1 comment

Comments

@zachpvin
Copy link

zachpvin commented Jan 18, 2023

I noticed that there are mismatched keys name in weight_dict, effectively making the losses calculation skipped loss_segments and loss_actionness in this line:

TadTR/engine.py

Lines 45 to 46 in 3af0abc

losses = sum(loss_dict[k] * weight_dict[k]
for k in loss_dict.keys() if k in weight_dict)

Looking at the weight_dict, loss_seg is used rather than loss_segments

TadTR/models/tadtr.py

Lines 498 to 501 in 3af0abc

weight_dict = {
'loss_ce': args.cls_loss_coef,
'loss_seg': args.seg_loss_coef,
'loss_iou': args.iou_loss_coef}

losses['loss_segments'] = loss_segment.sum() / num_segments

For actionness, it's assigned as loss_iou instead of loss_actionness, which replaced the loss_iou by segments loss.

losses['loss_iou'] = loss_actionness

Are these bugs? Could you confirm it? Thanks.

@xlliu7
Copy link
Owner

xlliu7 commented Feb 19, 2023

Hi @zachpvin,
Thanks for raising this issue. This is an error in the conversion from internal code to public code. It has been fixed in commit 983ae14.

@xlliu7 xlliu7 closed this as completed Feb 19, 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