Skip to content

单通道的输入,训练模型后,预测报错 #3937

Description

@hbpnov

问题确认 Search before asking

Bug描述 Describe the Bug

配置文件 添加通道变量后,预测报通道数不对错误,配置文件里的通道参数没有关联进来,修改PaddleSeg-release-2.10\tools\predict.py 第149行代码:transforms = Compose(builder.val_transforms),修改为:transforms = Compose(builder.val_transforms,False,1)。但这处理办法只是临时处理办法,正常的逻辑应该是配置文件的通道数参数自动关联代码里面的对应变量

复现环境 Environment

paddlepaddle2.6
PaddleSeg-release-2.10

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions