因为在使用Crossentropyloss作为损失函数时,output=net(input)的output应该是[batchsize, channel, height, weight]
,而label则是[batchsize, height, weight]
,label是单通道灰度图,而在BCELoss中,两者都是[batchsize, channel, height, weight]
。
01-14
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-05
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-20
1287
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-08
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交