欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

libtorch Tensor cannot be used as a tuple

程序员文章站 2022-05-26 17:52:51
...

 

Tensor cannot be used as a tuple

 

torch.jit.script_method  Tensor cannot be used as a tuple

错误代码:

函数返回一个x:

return x
        #
        # x = self.bn_last(x)
        # x = self.activation(x)
        # return output[0], output[1], x

而接收时需要三个值:

 out3, out4, out5 = model(x)