Closed 13070151771 closed 5 years ago
class single_scale_rpn_outputs(nn.Module): """Add RPN outputs to a single scale model (i.e., no FPN).""" def init(self, dim_in, spatial_scale): super(single_scale_rpn_outputs,self).init() self.dim_in = dim_in self.dim_out = dim_in if cfg.RPN.OUT_DIM_AS_IN_DIM else cfg.RPN.OUT_DIM anchors = generate_anchors( stride=1. / spatial_scale, sizes=cfg.RPN.SIZES, aspect_ratios=cfg.RPN.ASPECT_RATIOS) num_anchors = anchors.shape[0]
its faster-rcnn in python2.7,
stride=1. / spatial_scale, ZeroDivisionError: float division by zero
but in python3 It can run well
what can i do。555555555
class single_scale_rpn_outputs(nn.Module): """Add RPN outputs to a single scale model (i.e., no FPN).""" def init(self, dim_in, spatial_scale): super(single_scale_rpn_outputs,self).init() self.dim_in = dim_in self.dim_out = dim_in if cfg.RPN.OUT_DIM_AS_IN_DIM else cfg.RPN.OUT_DIM anchors = generate_anchors( stride=1. / spatial_scale, sizes=cfg.RPN.SIZES, aspect_ratios=cfg.RPN.ASPECT_RATIOS) num_anchors = anchors.shape[0]
its faster-rcnn in python2.7,
stride=1. / spatial_scale, ZeroDivisionError: float division by zero
but in python3 It can run well
what can i do。555555555