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

Bug in Sub-graph loss #50

Open
fjchange opened this issue Jun 4, 2021 · 1 comment
Open

Bug in Sub-graph loss #50

fjchange opened this issue Jun 4, 2021 · 1 comment

Comments

@fjchange
Copy link

fjchange commented Jun 4, 2021

def subgraph_loss_func(pred_bm, gt_iou_map, bm_mask, lambda1=10):

def subgraph_loss_func(pred_bm, gt_iou_map, bm_mask, lambda1=10):
    pred_bm_wcs = pred_bm[:, 0].contiguous()
    pred_bm_mse = pred_bm[:, 1].contiguous()
->  wce_loss = pem_reg_loss_func(pred_bm_wcs, gt_iou_map, bm_mask)
->  mse_loss = pem_cls_loss_func(pred_bm_mse, gt_iou_map, bm_mask)
    subgraph_loss = wce_loss + lambda1* mse_loss
    return subgraph_loss

Here, it is obvious that the wce_loss and mse_loss are wrongly named and lead to the wrong weighted sum.

@frostinassiky
Copy link
Owner

Very good catch @fjchange . This is a bug.

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