-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
代码里的faster_rcnn.py运行失败 #202
Comments
你好,建议在 |
这有可能是一个bug。 目前可以尝试在把 bs_rois_num_collect = paddle.concat(bs_rois_num_collect) 改成: if bs_rois_num_collect[0].ndim >= 1:
bs_rois_num_collect = paddle.concat(bs_rois_num_collect)
else:
bs_rois_num_collect = paddle.stack(bs_rois_num_collect) |
改后,报新的错误 |
看起来是类似的错误,可以尝试对 |
嗯,改完后,可以运行了,但训练不了几轮就报类似的错误,只不过出错位置不同 Traceback (most recent call last): |
类似这样的都是同一种错误,可以尝试根据报错信息,在使用concat的位置按照上面的方式修改~ |
好的,谢谢~ |
欢迎您反馈PaddleRS使用问题。辛苦您提供以下信息,以方便我们快速定位和解决问题:
Traceback (most recent call last):
File "tutorials/train/object_detection/faster_rcnn.py", line 75, in
model.train(
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\tasks\object_detector.py", line 350, in train
return self._real_train(**args)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\tasks\object_detector.py", line 454, in _real_train
self.train_loop(
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\tasks\base.py", line 396, in train_loop
outputs = self.train_step(step, data, net, optimizer)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\tasks\base.py", line 705, in train_step
outputs = self.run(net, data, mode='train')
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\tasks\object_detector.py", line 157, in run
net_out = net(inputs)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddle\nn\layer\layers.py", line 1429, in call
return self.forward(*inputs, **kwargs)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\models\ppdet\modeling\architectures\meta_arch.py", line 60, in forward
out = self.get_loss()
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\models\ppdet\modeling\architectures\faster_rcnn.py", line 112, in get_loss
rpn_loss, bbox_loss = self._forward()
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\models\ppdet\modeling\architectures\faster_rcnn.py", line 80, in _forward
rois, rois_num, rpn_loss = self.rpn_head(body_feats, self.inputs)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddle\nn\layer\layers.py", line 1429, in call
return self.forward(*inputs, **kwargs)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\models\ppdet\modeling\proposal_generator\rpn_head.py", line 141, in forward
rois, rois_num = self._gen_proposal(scores, deltas, anchors, inputs)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddlers\models\ppdet\modeling\proposal_generator\rpn_head.py", line 234, in _gen_proposal
bs_rois_num_collect = paddle.concat(bs_rois_num_collect)
File "E:\cwudis\software\anaconda3\envs\py3810\lib\site-packages\paddle\tensor\manipulation.py", line 1263, in concat
return _C_ops.concat(input, axis)
ValueError: (InvalidArgument) The axis is expected to be in range of [0, 0), but got 0
[Hint: Expected axis >= -rank && axis < rank == true, but received axis >= -rank && axis < rank:0 != true:1.] (at ..\paddle\phi\infermeta\multiary.cc:1035)
运行其他模型没问题
The text was updated successfully, but these errors were encountered: