当前位置: 代码迷 >> 综合 >> TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expe
  详细解决方案

TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expe

热度:42   发布时间:2023-11-11 10:03:57.0

**TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expected one of:

  • (torch.device device)
  • (torch.Storage storage)
  • (Tensor other)
  • (tuple of ints size, torch.device device)
  • (object data, torch.device device)
    程序报错**

错误程序 self.conv_u = nn.Conv2d(C,C/radio,1)
错误分析:/ 、 // 区别 我用的是python 3 ,导致整除这点出错了
改正操作: self.conv_u = nn.Conv2d(C,C//radio,1)

  相关解决方案