Hi, in my torch.jit.script I would like to convert a list to a tuple, but it seems not to be the easy way.
The size of the list is fixed - although not in a way that jit prefers:  which seems to be the problem
On Python 3.8 with PyTorch 1.9.1
result = []
val = torch.full((1,1),1.)
result.append(val) # size() = 1
return tuple(result)

… fails with Runtimeerror: cannot statically infer the expected size of a list in this context:
same as
val = torch.full((1,1),1.)
result:List[Tensor] = val * 1 
return tuple(result)

…fails with Runtimeerror: cannot statically infer the expected size of a list in this context:
Can someone please tell me how to do this in torch.jit.script (not trace!)
Thx