原文:pytorch報錯:ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1,512,1,1])

.pytorch報錯:ValueError: Expected more than value per channel when training, got input size torch.Size , , , .網上查找的原因為模型中用了batchnomolization,訓練中用batch訓練的時候當前batch恰好只含一個sample,而由於BatchNorm操作需要多於一個數據計算平均 ...

2019-11-14 16:53 0 1890 推薦指數:

查看詳情

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