首页 Paddle框架 帖子详情
使用paddledetection训练时报错 [Hint: Expected inputs_
收藏
快速回复
Paddle框架 问答学习资料 1094 2
使用paddledetection训练时报错 [Hint: Expected inputs_
收藏
快速回复
Paddle框架 问答学习资料 1094 2

PS D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3> python tools/train.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml
W0315 11:11:47.102717 4824 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.4, Runtime API Version: 10.2
W0315 11:11:47.115710 4824 device_context.cc:465] device: 0, cuDNN Version: 7.6.
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255] in pretrained weight yolo_head.yolo_output.0.bias is unmatched with the shape [27] in model yolo_head.yolo_output.0.bias. And the weight yolo_head.yolo_output.0.bias will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255, 1024, 1, 1] in pretrained weight yolo_head.yolo_output.0.weight is unmatched with the shape [27, 1024, 1, 1] in model yolo_head.yolo_output.0.weight. And the weight yolo_head.yolo_output.0.weight will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255] in pretrained weight yolo_head.yolo_output.1.bias is unmatched with the shape [27] in model yolo_head.yolo_output.1.bias. And the weight yolo_head.yolo_output.1.bias will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255, 512, 1, 1] in pretrained weight yolo_head.yolo_output.1.weight is unmatched with the shape [27, 512, 1, 1] in model yolo_head.yolo_output.1.weight. And the weight yolo_head.yolo_output.1.weight will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255] in pretrained weight yolo_head.yolo_output.2.bias is unmatched with the shape [27] in model yolo_head.yolo_output.2.bias. And the weight yolo_head.yolo_output.2.bias will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: The shape [255, 256, 1, 1] in pretrained weight yolo_head.yolo_output.2.weight is unmatched with the shape [27, 256, 1, 1] in model yolo_head.yolo_output.2.weight. And the weight yolo_head.yolo_output.2.weight will not be loaded
[03/15 11:11:49] ppdet.utils.checkpoint INFO: Finish loading model weights: C:\Users\13936/.cache/paddle/weights\yolov3_mobilenet_v1_270e_coco.pdparams
[03/15 11:11:49] ppdet.engine INFO: Epoch: [0] [ 0/701] learning_rate: 0.000033 loss_xy: 11.484313 loss_wh: 14.523974 loss_obj: 6713.033203 loss_cls: 11.524931 loss: 6750.566406 eta: 1:14:06 batch_cost: 0.1586 data_cost: 0.0000 ips: 6.3061 images/s
Traceback (most recent call last):
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\tools\train.py", line 171, in
main()
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\tools\train.py", line 167, in main
run(FLAGS, cfg)
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\tools\train.py", line 127, in run
trainer.train(FLAGS.eval)
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\ppdet\engine\trainer.py", line 401, in train
outputs = model(data)
File "D:\Python39\lib\site-packages\paddle\fluid\dygraph\layers.py", line 917, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\Python39\lib\site-packages\paddle\fluid\dygraph\layers.py", line 907, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\ppdet\modeling\architectures\meta_arch.py", line 54, in forward
out = self.get_loss()
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\ppdet\modeling\architectures\yolo.py", line 121, in get_loss
return self._forward()
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\ppdet\modeling\architectures\yolo.py", line 80, in _forward
neck_feats = self.neck(body_feats, self.for_mot)
File "D:\Python39\lib\site-packages\paddle\fluid\dygraph\layers.py", line 917, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "D:\Python39\lib\site-packages\paddle\fluid\dygraph\layers.py", line 907, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "D:\Python39\Lib\site-packages\paddle\PaddleDetection-release-2.3\ppdet\modeling\necks\yolo_fpn.py", line 456, in forward
block = paddle.concat([route, block], axis=1)
File "D:\Python39\lib\site-packages\paddle\tensor\manipulation.py", line 345, in concat
return paddle.fluid.layers.concat(input=x, axis=axis, name=name)
File "D:\Python39\lib\site-packages\paddle\fluid\layers\tensor.py", line 327, in concat
return _C_ops.concat(input, 'axis', axis)
ValueError: (InvalidArgument) The 2-th dimension of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [1, 256, 62, 62], input[1]'s shape = [1, 512, 61, 61].
[Hint: Expected inputs_dims[0][j] == inputs_dims[i][j], but received inputs_dims[0][j]:62 != inputs_dims[i][j]:61.] (at ..\paddle/fluid/operators/concat_op.h:63)
[operator < concat > error]

0
收藏
回复
全部评论(2)
时间顺序
JavaRoom
#2 回复于2022-03

请检查输入的数据

0
回复
离乡小童鞋
#3 回复于2022-03

解决了 用 paddldetection 2.2 就行了, 这次用2.3

 

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户