TypeError: empty() received an invalid combination of arguments
生活随笔
收集整理的這篇文章主要介紹了
TypeError: empty() received an invalid combination of arguments
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
填一個小坑
構建網絡卷積層時,報錯:TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:
報錯代碼
self.adaptivechannel=int(self.channels/2) #代碼未轉換類型self.conv_forAdaptive=nn.Conv2d(self.channels,self.adaptivechannel,1,1,0)報錯原因:
卷積通道數需為整型,整數相除為浮點型。
總結
以上是生活随笔為你收集整理的TypeError: empty() received an invalid combination of arguments的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: cocoa和cocoa Touch的区别
- 下一篇: 编解码学习笔记(七):微软Windows