pytorch版本UNet训练报错:1only batchs if spatial targets supported (non-empty 3D tensor) but got targets ..

目录 1. 问题分析 2. 解决方法 3. 其他问题 1. 问题分析 参考的pytorch版本的UNet github地址:https://github.com/milesial/Pytorch-UNet 现在的需求是: 输入单通道的图像,大小为:512X512; 输出是8个类别的语义分割结果,每个类别占用一个通道,值为0或1; 设置batch_size=1; 因此,输入为:1x1x512x512
相关文章
相关标签/搜索