Closed codeman008 closed 6 months ago
你先别加后面那一串参数 看下能跑通嘛
我实际就是参考文档中的单卡训练:python main.py --validate -c pptsm_fight_frames_dense.yaml,没有加入其他参数;只是修改了yaml里面的数据集路径
Bug描述 中我并没使用
另外你确定一下paddleocr文档里用的paddledet的版本 是不是能对上
在这个md文档里,我是参考打架的数据集更换成自定义数据集,均是进行裁剪、做标签和修改了yaml里面的数据集输入,这部分是成功的,只是后面报错: Traceback (most recent call last): File "main.py", line 141, in main() File "main.py", line 129, in main train_model(cfg, File "/data1/docker_project/PaddleVideo-develop/paddlevideo/tasks/train.py", line 238, in train_model outputs = model(data, mode='train') File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1429, in call return self.forward(*inputs, **kwargs) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/framework/recognizers/base.py", line 49, in forward return self.train_step(data_batch) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/framework/recognizers/recognizer2d.py", line 48, in train_step loss_metrics = self.head.loss(cls_score, labels) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/heads/base.py", line 110, in loss top1a, top5a = self.get_acc(scores, labels_a, valid_mode) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/heads/base.py", line 157, in get_acc top5 = paddle.metric.accuracy(input=scores, label=labels, k=5) File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/metric/metrics.py", line 805, in accuracy topk_out, topk_indices = paddle.topk(input, k=k) File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/tensor/search.py", line 1009, in topk out, indices = _C_ops.topk(x, k, axis, largest, sorted) ValueError: (InvalidArgument) x has only 2 element, can not find 5 top values. [Hint: Expected x.numel() >= k, but received x.numel():2 < k:5.] (at /paddle/paddle/phi/kernels/gpu/top_k_kernel.cu:84)
你先别加后面那一串参数 看下能跑通嘛
不传参直接跑跑不通了,我用自己训练的cdla模型测试是没问题的,但是下载提供的cdla预训练模型就报错,yml文件用的和训练cdla的是同一个
直接运行python main.py不加参数?均使用默认?
在这个md文档里,我是参考打架的数据集更换成自定义数据集,均是进行裁剪、做标签和修改了yaml里面的数据集输入,这部分是成功的,只是后面报错: Traceback (most recent call last): File "main.py", line 141, in main() File "main.py", line 129, in main train_model(cfg, File "/data1/docker_project/PaddleVideo-develop/paddlevideo/tasks/train.py", line 238, in train_model outputs = model(data, mode='train') File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1429, in call return self.forward(*inputs, **kwargs) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/framework/recognizers/base.py", line 49, in forward return self.train_step(data_batch) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/framework/recognizers/recognizer2d.py", line 48, in train_step loss_metrics = self.head.loss(cls_score, labels) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/heads/base.py", line 110, in loss top1a, top5a = self.get_acc(scores, labels_a, valid_mode) File "/data1/docker_project/PaddleVideo-develop/paddlevideo/modeling/heads/base.py", line 157, in get_acc top5 = paddle.metric.accuracy(input=scores, label=labels, k=5) File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/metric/metrics.py", line 805, in accuracy topk_out, topk_indices = paddle.topk(input, k=k) File "/data1/docker_project/ENV/pad/lib/python3.8/site-packages/paddle/tensor/search.py", line 1009, in topk out, indices = _C_ops.topk(x, k, axis, largest, sorted) ValueError: (InvalidArgument) x has only 2 element, can not find 5 top values. [Hint: Expected x.numel() >= k, but received x.numel():2 < k:5.] (at /paddle/paddle/phi/kernels/gpu/top_k_kernel.cu:84)
先不做任何改动,直接运行文档说明看看能否运行
问题确认 Search before asking
Bug组件 Bug Component
Deploy
Bug描述 Describe the Bug
下载CDLA数据的预训练及推理模型:(picodet_lcnet_x1_0_fgd_layout_cdla)https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/docs/models_list.md 运行指令:
python3 tools/infer.py -c configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x1_0_layout.yml --slim_config configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x2_5_layout.yml -o weights='output/picodet_lcnet_x1_0_fgd_layout_cdla_infer/best_model.pdparams' --infer_dir='dataset/test_data/' --output_dir=output_dir_baidu_test/ --draw_threshold=0.5
修改picodet_lcnet_x1_0_layout.yml 相关配置可以成功测试自己下载CDLA训练之后的模型,但直接跑提供的picodet_lcnet_x1_0_fgd_layout_cdla 报错: 请大佬帮忙解答一下谢谢复现环境 Environment
环境没问题,能够跑train及train之后的测试
Bug描述确认 Bug description confirmation
是否愿意提交PR? Are you willing to submit a PR?