首页
资讯
新闻
科技要闻
人工智能
5G/通信
互联网
手机
数码
家电
机器人
IT资讯
半导体
商业
标签 >
only batches of spatial targets supported:三通道分割 one-hot 转为每像素类别编号
三通道 one-hot 分割标签转像素类别编号,解决 only batches of spatial targets 报错
这个报错的根本原因是 PyTorch 的 CrossEntropyLoss 做多类语义分割时,要求标签 target 是 3 维张量[batch, H, W]、存像素类别
2026-11-09 17:09:10