美文网首页pytorch学习笔记PyTorch
pytorch调用inception-v3报错 'max() r

pytorch调用inception-v3报错 'max() r

作者: 洗洗睡吧i | 来源:发表于2020-04-09 00:22 被阅读0次

    pytorch调用inception-v3报错:

    error:
      train_model(model, criterion, optimizer, scheduler, num_epochs)
           37    outputs = model(inputs)
      ---> 38    _, preds = torch.max(outputs, 1)
           39    loss = criterion(outputs, labels)
      TypeError: max() received an invalid combination of arguments - got (InceptionOutputs, int), but expected one of: ...
    
    

    软件版本:

    • python: 3.7.7
    • pytorch: 1.4.0
    • torchvision: 0.5.0

    解决办法:

    相关文章

      网友评论

        本文标题:pytorch调用inception-v3报错 'max() r

        本文链接:https://www.haomeiwen.com/subject/tpifmhtx.html