Skip to content

fix(reldn-heads): prd_bias_scores undefined when (+1 more) - #41

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:masterfrom
andrewwhitecdw:bugfix/reldn-heads-assorted-24abf362
Open

fix(reldn-heads): prd_bias_scores undefined when (+1 more)#41
andrewwhitecdw wants to merge 1 commit into
NVIDIA:masterfrom
andrewwhitecdw:bugfix/reldn-heads-assorted-24abf362

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

This PR addresses 2 issues in lib/modeling_rel/reldn_heads.py.

Fix 1

fix: prd_bias_scores undefined when USE_FREQ_BIAS is False

Fix: Replace:

        sbj_cls_scores = None
        obj_cls_scores = None
            
        if cfg.MODEL.USE_FREQ_BIAS:

with:

        sbj_cls_scores = None
        obj_cls_scores = None
        prd_bias_scores = None
            
        if cfg.MODEL.USE_FREQ_BIAS:

Fix 2

fix: torch.tensor breaks graph/device for total scores

Fix: Replace:

            ttl_cls_scores = torch.tensor(prd_vis_scores)

with:

            ttl_cls_scores = prd_vis_scores.clone()

Files changed

  • lib/modeling_rel/reldn_heads.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 27, 2026 21:08
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

Successfully merging this pull request may close these issues.

1 participant