Skip to content

Commit 529f97e

Browse files
committed
Missed fix for batch size 1
1 parent 3cea4d2 commit 529f97e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/nets/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def _region_proposal(self, net_conv):
240240
rpn_cls_score = self.rpn_cls_score_net(rpn) # batch * (num_anchors * 2) * h * w
241241

242242
# change it so that the score has 2 as its channel size
243-
rpn_cls_score_reshape = rpn_cls_score.view(self._batch_size, 2, -1, rpn_cls_score.size()[-1]) # batch * 2 * (num_anchors*h) * w
243+
rpn_cls_score_reshape = rpn_cls_score.view(1, 2, -1, rpn_cls_score.size()[-1]) # batch * 2 * (num_anchors*h) * w
244244
rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape)
245245

246246
# Move channel to the last dimenstion, to fit the input of python functions

0 commit comments

Comments
 (0)