From 3bc5b56b729aeb533c6f121f5802f30696384075 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 30 Aug 2019 14:24:08 +0800 Subject: [PATCH] fix rpn_only in cascade mask fpn (#3231) * fix rpn_only in cascade mask fpn * fix rpn_only in cascade rcnn --- ppdet/modeling/architectures/cascade_mask_rcnn.py | 4 ++-- ppdet/modeling/architectures/cascade_rcnn.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ppdet/modeling/architectures/cascade_mask_rcnn.py b/ppdet/modeling/architectures/cascade_mask_rcnn.py index ede3ffdfa..2e480b784 100644 --- a/ppdet/modeling/architectures/cascade_mask_rcnn.py +++ b/ppdet/modeling/architectures/cascade_mask_rcnn.py @@ -114,8 +114,8 @@ class CascadeMaskRCNN(object): if self.rpn_only: im_scale = fluid.layers.slice( im_info, [1], starts=[2], ends=[3]) - im_scale = fluid.layers.sequence_expand(im_scale, rois) - rois = rois / im_scale + im_scale = fluid.layers.sequence_expand(im_scale, rpn_rois) + rois = rpn_rois / im_scale return {'proposal': rois} proposal_list = [] diff --git a/ppdet/modeling/architectures/cascade_rcnn.py b/ppdet/modeling/architectures/cascade_rcnn.py index 133281e4f..6f4c41648 100644 --- a/ppdet/modeling/architectures/cascade_rcnn.py +++ b/ppdet/modeling/architectures/cascade_rcnn.py @@ -106,8 +106,8 @@ class CascadeRCNN(object): if self.rpn_only: im_scale = fluid.layers.slice( im_info, [1], starts=[2], ends=[3]) - im_scale = fluid.layers.sequence_expand(im_scale, rois) - rois = rois / im_scale + im_scale = fluid.layers.sequence_expand(im_scale, rpn_rois) + rois = rpn_rois / im_scale return {'proposal': rois} proposal_list = [] -- GitLab