I have a for loop where each iteration will give a tensor in this shape: tensor([[[0., 1., 1., 2., 1., 1., 0.],
[0., 2., 1., 1., 2., 1., 0.],
[0., 1., 5., 3., 1., 1., 0.]]])
How can I append new tensors to this one and form a tensor in this shape at last:
(for example, in second iteration the tensor will be
tensor([[[0., 0., 1., 2., 1., 0., 0.],
[0., 0., 2., 3., 3., 0., 0.],
[0., 0., 1., 2., 2., 0., 0.]]]))
The expected output at last is:
tensor([[[0., 1., 1., 2., 1., 1., 0.],
[0., 0., 1., 2., 1., 0., 0.]],
[[0., 2., 1., 1., 2., 1., 0.],
[0., 0., 2., 3., 3., 0., 0.]],
[[0., 1., 5., 3., 1., 1., 0.],
[0., 0., 1., 2., 2., 0., 0.]]])