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
相關文章
相關標籤/搜索