111229:

type(tmp) -> <class ‘list’> type(tmp[0]) -> <class ‘torch.Tensor’> type(tmp[0][0]) -> <class ‘torch.Tensor’>


import torch
tmp=[torch.rand(2,4),torch.rand(2,4)]
print(type(tmp))
print(type(tmp[0]))
print(type(tmp[0][0]))

# The full tmp
print(tmp)

# After a stack, you convert the list to a dimensions
torch.stack(tmp)

Responses
<class 'list'>
<class 'torch.Tensor'>
<class 'torch.Tensor'>
[tensor([[0.3083, 0.6300, 0.0910, 0.1102],
        [0.4926, 0.2878, 0.5105, 0.2535]]), tensor([[0.2245, 0.6037, 0.6991, 0.1598],
        [0.8157, 0.5108, 0.3417, 0.6245]])]
tensor([[[0.3083, 0.6300, 0.0910, 0.1102],
         [0.4926, 0.2878, 0.5105, 0.2535]],

        [[0.2245, 0.6037, 0.6991, 0.1598],
         [0.8157, 0.5108, 0.3417, 0.6245]]])

Hope this helps