原文:python報錯:1only batches of spatial targets supported (non-empty 3D tensors) but got targets of size

因為在使用Crossentropyloss作為損失函數時,output net input 的output應該是 batchsize, channel, height, weight ,而label則是 batchsize, height, weight ,label是單通道灰度圖,而在BCELoss中,兩者都是 batchsize, channel, height, weight 。 我報錯是因 ...

2020-10-16 16:58 0 916 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM