Solved by thecho7 in post #2 
              
              
                You can concatenate the tensors along the specific dimension. 
Your question can be briefly expressed like below, 
a = torch.Size(1, 3, 7)
b = torch.Size(1, 3, 7)

result = torch.cat((a, b), dim=1)

Then, you can get  the result tensor size of (1, 6, 7) 
The sample code 
for i in range(it):
    try:…