How to append n dimension list

To append the elements to list of 1 dimension,
list.append(somthing) may be okay.
but how can i make the list which has the shape of (3,11,100,100) to (3,16,100,100)
I want to concatenate two list, (3,11,100,100) + (3,5,100,100)

Is there any functions for doing this kind of work? or do i have to make my own code?

You can use torch.cat.

So in your example torch.cat([a,b], dim=1) should fo the trick.

1 Like