yingxingde / FasterRCNN-pytorch

FasterRCNN is implemented in VGG, ResNet and FPN base.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assert rpn_keep.numel() == cfg.TRAIN.RPN_BATCHSIZE

tcxia opened this issue · comments

Traceback (most recent call last):
File "train.py", line 169, in
pretrained_model=args.weight, max_iters=args.max_iters)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/model/train_val.py", line 487, in train_net
sw.train_model(resume, max_iters)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/model/train_val.py", line 130, in train_model
loss_r, image_r = net.train_operation(blobs, None, image_if=True)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/nets/network.py", line 334, in train_operation
result_cls_prob, result_bbox_pred, result_rois = self(im_data, im_info, gt_boxes)
File "/work/tcxia/anaconda3/envs/py36_th0.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/nets/network.py", line 247, in forward
cls_prob, bbox_pred, rois = self._predict(im_data, im_info, gt_boxes)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/nets/network.py", line 214, in _predict
rois, rpn_scores, features = self._rpn(im_data, im_info, gt_boxes)
File "/work/tcxia/anaconda3/envs/py36_th0.4/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/nets/network.py", line 88, in forward
self.cross_entropy, self.loss_box = self._build_loss(rpn_cls_score_reshape, rpn_bbox_score, rpn_data)
File "/work/tcxia/codes/FasterRCNN-pytorch/lib/nets/network.py", line 104, in _build_loss
assert rpn_keep.numel() == cfg.TRAIN.RPN_BATCHSIZE
AssertionError