PaddlePaddle / PaddleYOLO

🚀🚀🚀 YOLO series of PaddlePaddle implementation, PP-YOLOE+, RT-DETR, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOv10, YOLOX, YOLOv5u, YOLOv7u, YOLOv6Lite, RTMDet and so on. 🚀🚀🚀
https://github.com/PaddlePaddle/PaddleYOLO
GNU General Public License v3.0
558 stars 134 forks source link

paddleYOLOV5 : The meta data must be valid when call the mutable data function. #132

Closed zhangxp12 closed 1 year ago

zhangxp12 commented 1 year ago

问题确认 Search before asking

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

(PaddleYOLO) D:\project\GitHub\PaddleYOLO\PaddleYOLO>python tools/train.py -c configs/yolov5/yolov5_x_300e_coco.yml --eval loading annotations into memory... Done (t=0.01s) creating index... index created! [05/06 13:56:41] ppdet.data.source.coco INFO: Load [230 samples valid, 0 samples invalid] in file dataset/coco2/annotations/train.json. W0506 13:56:41.844275 10804 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.1, Runtime API Version: 10.2 W0506 13:56:41.851253 10804 gpu_resources.cc:91] device: 0, cuDNN Version: 7.6. [05/06 13:56:45] ppdet.engine INFO: Epoch: [0] [ 0/230] eta: 17:05:51 lr: 0.000000 loss_box: 0.117473 loss_obj: 2.690734 loss_cls: 0.000000 loss: 2.808207 batch_cost: 1.3381 data_cost: 0.0000 ips: 0.7473 images/s Traceback (most recent call last): File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\tools\train.py", line 188, in main() File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\tools\train.py", line 184, in main run(FLAGS, cfg) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\tools\train.py", line 137, in run trainer.train(FLAGS.eval) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\engine\trainer.py", line 433, in train outputs = model(data) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(*inputs, kwargs) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, *kwargs) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\architectures\meta_arch.py", line 59, in forward out = self.get_loss() File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\architectures\yolov5.py", line 95, in get_loss return self._forward() File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\architectures\yolov5.py", line 77, in _forward yolo_losses = self.yolo_head(neck_feats, self.inputs) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(inputs, kwargs) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, kwargs) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\heads\yolov5_head.py", line 132, in forward return self.loss(yolo_outputs, targets, self.anchors) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 930, in call return self._dygraph_call_func(*inputs, *kwargs) File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\layers.py", line 915, in _dygraph_call_func outputs = self.forward(inputs, kwargs) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\losses\yolov5_loss.py", line 201, in forward tcls, tbox, indices, anch = self.build_targets_paddle(inputs, targets, anchors) File "D:\project\GitHub\PaddleYOLO\PaddleYOLO\ppdet\modeling\losses\yolov5_loss.py", line 282, in build_targets_paddle gxi = gain[[2, 3]] - gxy # inverse File "D:\Program Files (x86)\python_package\PaddleYOLO\lib\site-packages\paddle\fluid\dygraph\math_op_patch.py", line 303, in impl return math_op(self, other_var, 'axis', axis) RuntimeError: (PreconditionNotMet) The meta data must be valid when call the mutable data function. (at ..\paddle\phi\core\dense_tensor.cc:105) [operator < elementwise_sub > error]

复现环境 Environment

python 3.9.10 paddle 2.3.1 cuda 10.1 cuDNN 7.6

Bug描述确认 Bug description confirmation

是否愿意提交PR? Are you willing to submit a PR?

nemonameless commented 1 year ago

win请安装更高版本paddle

zhangxp12 commented 1 year ago

您好,paddle 升到 2.3.2 ,还是报这个错误

nemonameless commented 1 year ago

win的paddle需要更高版本,你可以直接安develop的paddle,打印版本号会显示是0.0.0