PaddlePaddle / PaddleSeg

Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
https://arxiv.org/abs/2101.06175
Apache License 2.0
8.69k stars 1.68k forks source link

按照官方PaddleSeg实战训练optic_disc_seg报错 #3556

Closed fly627600815 closed 1 day ago

fly627600815 commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

按照官方PaddleSeg实战训练optic_disc_seg报错: intersect_area, pred_area, label_area = metrics.calculate_area( File "/home/gzai/.local/lib/python3.9/site-packages/paddleseg/utils/metrics.py", line 57, in calculate_area pred_area = paddle.concat(pred_area) File "/home/gzai/.local/lib/python3.9/site-packages/paddle/tensor/manipulation.py", line 1121, 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:954)

fly627600815 commented 1 year ago

按照这个处理还是一样报错#3408

shiyutang commented 1 year ago

安装2.8.1以上就不会有这个问题了。

wjlhahaha commented 1 month ago

请问您的问题解决了吗,我也遇到了这个问题,I0918 12:55:21.369655 22224 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify 'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6. 2024-09-18 12:55:21 [INFO] [TRAIN] epoch: 1, iter: 10/50, loss: 1.9217, lr: 0.008364, batch_cost: 41.8659, reader_cost: 0.18827, ips: 0.7643 samples/sec | ETA 00:27:54 2024-09-18 12:55:21 [INFO] Start evaluating (total_samples: 202, total_iters: 202)... Traceback (most recent call last): File "D:\PyCharm\PyCharmProject\Image Segmentation\PaddleSeg-release-2.9.1\PaddleSeg-release-2.9.1\tools\train.py", line 219, in main(args) File "D:\PyCharm\PyCharmProject\Image Segmentation\PaddleSeg-release-2.9.1\PaddleSeg-release-2.9.1\tools\train.py", line 193, in main train( File "D:\Anaconda3\envs\paddle\lib\site-packages\paddleseg\core\train.py", line 315, in train meaniou, acc, , , = evaluate( File "D:\Anaconda3\envs\paddle\lib\site-packages\paddleseg\core\val.py", line 161, in evaluate intersect_area, pred_area, label_area = metrics.calculate_area( File "D:\Anaconda3\envs\paddle\lib\site-packages\paddleseg\utils\metrics.py", line 57, in calculate_area pred_area = paddle.concat(pred_area) File "D:\Anaconda3\envs\paddle\lib\site-packages\paddle\tensor\manipulation.py", line 1121, 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:961)

TingquanGao commented 1 day ago

Thanks for this issue. As it has been inactive for a long time, we would close it. If you has any questions, please feel free to reopen or new issue, and we will follow up and resolve it.