未验证 提交 fdda2ecc 编写于 作者: W wangguanzhong 提交者: GitHub

fix mask rcnn in eval when num_classes is 1 (#6169)

上级 af6c8ef3
......@@ -221,7 +221,7 @@ class MaskHead(nn.Layer):
mask_feat = self.head(rois_feat)
mask_logit = self.mask_fcn_logits(mask_feat)
if self.num_classes == 1:
mask_out = F.sigmoid(mask_logit)
mask_out = F.sigmoid(mask_logit)[:, 0, :, :]
else:
num_masks = paddle.shape(mask_logit)[0]
index = paddle.arange(num_masks).cast('int32')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册