TypeError: empty() received an invalid combination of arguments
生活随笔
收集整理的這篇文章主要介紹了
TypeError: empty() received an invalid combination of arguments
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
填一個小坑
構(gòu)建網(wǎng)絡(luò)卷積層時,報錯:TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:
報錯代碼
self.adaptivechannel=int(self.channels/2) #代碼未轉(zhuǎn)換類型self.conv_forAdaptive=nn.Conv2d(self.channels,self.adaptivechannel,1,1,0)報錯原因:
卷積通道數(shù)需為整型,整數(shù)相除為浮點型。
總結(jié)
以上是生活随笔為你收集整理的TypeError: empty() received an invalid combination of arguments的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: cocoa和cocoa Touch的区别
- 下一篇: 什么是DNS的正向解析与反向解析?代码实