-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
paddleseg2.8根据官方文档跑默认的configs/quick_start/pp_liteseg_optic_disc_512x512_1k.yml配置报错 #3373
Comments
是的 |
在AI studio上面可以复现出来! |
同样的出错,在AiStudio上的PaddleSeg-2.6.0,我在不对模型进行评估的情况下可以正常保存模型,但是一旦对模型进行评估,--do_eval,就会报错 |
所以这个问题没有解决吗?我也遇到这个问题。而且前面的警告一直停不下来,好像是每轮报两次:I0712 14:24:21.198009 19039 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. |
关于这个警告,可以在训练前使用这个终端命令,使警告不出现。 export FLAGS_set_to_1d=False |
具体的是: PaddleSeg/paddleseg/core/train.py 1、 264行 avg_loss_list = [l.numpy() for l in loss_list] avg_loss_list = [l.item() for l in loss_list] avg_loss_list[i] += loss_list[i].numpy() avg_loss_list[i] += loss_list[i].item() avg_loss_list = [l[0] / log_iters for l in avg_loss_list] avg_loss_list = [l / log_iters for l in avg_loss_list] |
|
我也遇到了一样的问题,请问题主解决了吗 |
详情请见 #3408 |
好嘞我试试,不过这个装得好慢啊~ |
解决了吗 ?请问怎么解决的呀 |
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. |
问题确认 Search before asking
Bug描述 Describe the Bug
当程序运行到第一次保存模型的轮数时,会报下面的警告和错误
I0712 14:24:21.198009 19039 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.
2023-07-12 14:26:44 [INFO] [TRAIN] epoch: 17, iter: 500/10000, loss: 1.8821, lr: 0.000972, batch_cost: 0.4265, reader_cost: 0.30989, ips: 14.0681 samples/sec | ETA 01:07:31
2023-07-12 14:26:44 [INFO] Start evaluating (total_samples: 45, total_iters: 45)...
Traceback (most recent call last):
File "/home/aistudio/PaddleSeg/tools/train.py", line 195, in
main(args)
File "/home/aistudio/PaddleSeg/tools/train.py", line 170, in main
train(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddleseg/core/train.py", line 315, in train
mean_iou, acc, _, _, _ = evaluate(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddleseg/core/val.py", line 161, in evaluate
intersect_area, pred_area, label_area = metrics.calculate_area(
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddleseg/utils/metrics.py", line 57, in calculate_area
pred_area = paddle.concat(pred_area)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/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)
复现环境 Environment
Bug描述确认 Bug description confirmation
是否愿意提交PR? Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: