首页 Paddle框架 帖子详情
PaddleSeg运行报错(新人)是计算损失时多出了一些数据吗?
收藏
快速回复
Paddle框架 问答模型训练深度学习 646 1
PaddleSeg运行报错(新人)是计算损失时多出了一些数据吗?
收藏
快速回复
Paddle框架 问答模型训练深度学习 646 1

[Errno 2] No such file or directory: 'PaddleSeg/'
/home/aistudio/PaddleSeg
2022-10-03 18:36:03 [INFO]
------------Environment Information-------------
platform: Linux-4.15.0-140-generic-x86_64-with-debian-stretch-sid
Python: 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0]
Paddle compiled with cuda: True
NVCC: Build cuda_11.2.r11.2/compiler.29618528_0
cudnn: 8.2
GPUs used: 1
CUDA_VISIBLE_DEVICES: None
GPU: ['GPU 0: Tesla V100-SXM2-16GB']
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
PaddleSeg: 2.6.0
PaddlePaddle: 2.3.2
OpenCV: 4.1.1
------------------------------------------------
2022-10-03 18:36:03 [INFO]
---------------Config Information---------------
batch_size: 1
iters: 40000
learning_rate:
decay:
end_lr: 0.0
power: 0.9
type: poly
value: 0.00125
loss:
coef:
- 1
types:
- coef:
- 0.7
- 0.3
losses:
- type: CrossEntropyLoss
- type: DiceLoss
type: MixedLoss
model:
num_classes: 2
type: UNet
use_deconv: false
optimizer:
momentum: 0.9
type: sgd
weight_decay: 4.0e-05
train_dataset:
dataset_root: ./
mode: train
num_classes: 2
train_path: data/dataset/Train/train_names.txt
transforms:
- max_scale_factor: 2.0
min_scale_factor: 0.5
scale_step_size: 0.25
type: ResizeStepScaling
- target_size:
- 1444
- 1444
type: Resize
- type: RandomHorizontalFlip
- type: Normalize
type: Dataset
val_dataset:
dataset_root: ./
mode: val
num_classes: 2
transforms:
- target_size:
- 1444
- 1444
type: Resize
- type: Normalize
type: Dataset
val_path: data/dataset/Train/val_names.txt
------------------------------------------------
W1003 18:36:03.302363 16049 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 11.2
W1003 18:36:03.302404 16049 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2.
2022-10-03 18:36:04 [WARNING] `learning_rate` in configuration file will be deprecated, please use `lr_scheduler` instead. E.g
lr_scheduler:
type: PolynomialDecay
learning_rate: 0.01
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/nn/layer/norm.py:654: UserWarning: When training, we now always track global mean and variance.
"When training, we now always track global mean and variance.")
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py:278: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.float32, but right dtype is paddle.int64, the right dtype will convert to paddle.float32
format(lhs_dtype, rhs_dtype, lhs_dtype))
Traceback (most recent call last):
File "train.py", line 230, in
main(args)
File "train.py", line 225, in main
to_static_training=cfg.to_static_training)
File "/home/aistudio/PaddleSeg/paddleseg/core/train.py", line 211, in train
losses=losses)
File "/home/aistudio/PaddleSeg/paddleseg/core/train.py", line 48, in loss_computation
mixed_loss_list = loss_i(logits, labels)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/home/aistudio/PaddleSeg/paddleseg/models/losses/mixed_loss.py", line 55, in forward
output = loss(logits, labels)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/home/aistudio/PaddleSeg/paddleseg/models/losses/cross_entropy_loss.py", line 86, in forward
weight=self.weight)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/nn/functional/loss.py", line 1723, in cross_entropy
label_max.item()))
ValueError: Target 254 is out of upper bound.

0
收藏
回复
全部评论(1)
时间顺序
H
Hekenye
#2 回复于2022-10

用安装Paddle2.2的环境尝试一下

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