Hi,
I want to change the number of channels in my tensor:
for example 128 to 256. I used the code below,
a = torch.randn(2, 128, 221, 221)
a = a.expand(-1,256,-1,-1)
but I got this error
RuntimeError: The expanded size of the tensor (256) must match the existing size (128) at non-singleton dimension 1.  Target sizes: [-1, 256, -1, -1].  Tensor sizes: [2, 128, 221, 221]