I have a torch script that accepts a tuple[Tensor],
@torch.jit.script
def smt_pred(confs, child, child_sizes, threshold, obj,
             height, width, a):
    # type: (Tuple[Tensor],Tuple[Tensor],Tuple[Tensor],Tensor,Tensor,Tensor,Tensor,Tensor) -> Tuple[Tensor,Tensor]


When I call the code in Python2 I get the error

RuntimeError: smt_pred() Expected a value of type ‘Tuple[Tensor]’ for argument ‘confs’ but instead found type ‘tuple’.

tuple is same as Tuple and I could not find how to annotate confs to be tuple of tensors. Is it possible in Python2?

Changing Tuple to List works in Python2, so this is only about Tuple