环境paddleseg2.3 paddle2.2.1
输入图像为两图像叠加成6通道的图像,标签图为单通道。使用unet++可以正常运行,使用unet3+报错。最初报错为
RuntimeError: The length of logits_list should equal to the types of loss config: 5 != 1.
我把paddleseg.core.train文件中第193行的logits_list = logits_list改为logits_list = [logits_list]报错
'list' object has no attribute 'shape'
于是在bceloss文件中增加
label = paddle.to_tensor(label)
logit = paddle.to_tensor(logit)
接着报错ValueError: (InvalidArgument) Input(X) and Input(Label) shall have the same shape except the last dimension. But received: the shape of Input(X) is [5, 1, 2, 512, 512], the shape of Input(Label) is [1, 1, 1, 512, 512].
不知道该从哪再改
已结题
(InvalidArgument) Input(X) and Input(Label) shall have the same shape except the last dimension.
- 写回答
- 好问题 提建议
- 追加酬金
- 关注问题
- 分享
- 邀请回答