Skip to content

fix: contrastive positive spt_feat blobs added regardless of - #46

Draft
andrewwhitecdw wants to merge 1 commit into
NVIDIA:masterfrom
andrewwhitecdw:bugfix/generate-rel-proposal-labels-96cb9f65
Draft

fix: contrastive positive spt_feat blobs added regardless of#46
andrewwhitecdw wants to merge 1 commit into
NVIDIA:masterfrom
andrewwhitecdw:bugfix/generate-rel-proposal-labels-96cb9f65

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

Problem

fix: contrastive positive spt_feat blobs added regardless of USE_SPATIAL_FEAT

Fix

Apply patch:

--- a/lib/modeling_rel/generate_rel_proposal_labels.py
+++ b/lib/modeling_rel/generate_rel_proposal_labels.py
@@ -21,10 +21,16 @@ class GenerateRelProposalLabelsOp(nn.Module):
         if cfg.MODEL.USE_NODE_CONTRASTIVE_LOSS or cfg.MODEL.USE_NODE_CONTRASTIVE_SO_AWARE_LOSS or cfg.MODEL.USE_NODE_CONTRASTIVE_P_AWARE_LOSS:
             output_blob_names += ['binary_labels_sbj_pos_int32',
-                                  'sbj_rois_sbj_pos', 'obj_rois_sbj_pos', 'rel_rois_sbj_pos',
-                                  'spt_feat_sbj_pos',
+                                  'sbj_rois_sbj_pos', 'obj_rois_sbj_pos', 'rel_rois_sbj_pos']
+            if cfg.MODEL.USE_SPATIAL_FEAT:
+                output_blob_names += ['spt_feat_sbj_pos']
+            output_blob_names += [
                                   'sbj_labels_sbj_pos_int32', 'obj_labels_sbj_pos_int32', 'prd_labels_sbj_pos_int32',
                                   'sbj_labels_sbj_pos_fg_int32', 'obj_labels_sbj_pos_fg_int32',
                                   'inds_unique_sbj_pos',
                                   'inds_reverse_sbj_pos',
                                   'binary_labels_obj_pos_int32',
-                                  'sbj_rois_obj_pos', 'obj_rois_obj_pos', 'rel_rois_obj_pos',
-                                  'spt_feat_obj_pos',
+                                  'sbj_rois_obj_pos', 'obj_rois_obj_pos', 'rel_rois_obj_pos']
+            if cfg.MODEL.USE_SPATIAL_FEAT:
+                output_blob_names += ['spt_feat_obj_pos']
+            output_blob_names += [
                                   'sbj_labels_obj_pos_int32', 'obj_labels_obj_pos_int32', 'prd_labels_obj_pos_int32',
                                   'sbj_labels_obj_pos_fg_int32', 'obj_labels_obj_pos_fg_int32',
                                   'inds_unique_obj_pos',
                                   'inds_reverse_obj_pos']

Files changed

  • lib/modeling_rel/generate_rel_proposal_labels.py

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