import torch

import numpy as np


x = torch.rand(4,4)

y = torch.rand(4,4)

print(x)

print(y)

print(torch.cat((x,y),0))

If I execute this code it will be like
tensor([[0.1211, 0.7577, 0.8376, 0.4488],
        [0.6628, 0.8632, 0.9736, 0.8368],
        [0.5848, 0.0872, 0.0469, 0.2834],
        [0.8561, 0.6229, 0.3667, 0.1358]])
tensor([[0.1820, 0.8955, 0.3811, 0.5496],
        [0.5745, 0.3199, 0.5228, 0.8269],
        [0.8408, 0.6984, 0.7248, 0.1973],
        [0.3045, 0.9651, 0.8701, 0.3180]])
tensor([[0.1211, 0.7577, 0.8376, 0.4488],
        [0.6628, 0.8632, 0.9736, 0.8368],
        [0.5848, 0.0872, 0.0469, 0.2834],
        [0.8561, 0.6229, 0.3667, 0.1358],
        [0.1820, 0.8955, 0.3811, 0.5496],
        [0.5745, 0.3199, 0.5228, 0.8269],
        [0.8408, 0.6984, 0.7248, 0.1973],
        [0.3045, 0.9651, 0.8701, 0.3180]])

is there a way that I coult concat like
tensor([[0.1211, 0.7577, 0.8376, 0.4488],
[[0.1820, 0.8955, 0.3811, 0.5496],
[0.6628, 0.8632, 0.9736, 0.8368],
…
which is x row 1 comes first
and y row 1 and x row 2 and so on
Thank you for reading