未验证 提交 15fd9316 编写于 作者: F Feng Ni 提交者: GitHub

fix ppyoloe_head (#7717)

上级 0eeb077e
...@@ -323,7 +323,11 @@ class PPYOLOEHead(nn.Layer): ...@@ -323,7 +323,11 @@ class PPYOLOEHead(nn.Layer):
assigned_bboxes, assigned_scores, assigned_scores_sum): assigned_bboxes, assigned_scores, assigned_scores_sum):
# select positive samples mask # select positive samples mask
mask_positive = (assigned_labels != self.num_classes) mask_positive = (assigned_labels != self.num_classes)
self.distill_pairs['mask_positive_select'] = mask_positive
if self.for_distill:
# only used for LD main_kd distill
self.distill_pairs['mask_positive_select'] = mask_positive
num_pos = mask_positive.sum() num_pos = mask_positive.sum()
# pos/neg loss # pos/neg loss
if num_pos > 0: if num_pos > 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册