Torch.jit.script error: Tensor cannot be used as a tuple

Here is my forward function.
def forward(self, inputs):
if self.first_time:
p3, p4, p5 = inputs

        p3_in = self.f3(p3)
        p4_in = self.f4(p4)
        p5_in = self.f5(p5)

    else:
        p3_in, p4_in, p5_in = inputs

error shows:
RuntimeError:
Tensor cannot be used as a tuple:
if self.first_time:
p3, p4, p5 = inputs
~~~~~~ <— HERE

is there anyway to resolve this error?

1 Like

I got the same problem. Did you solve it ? THX