self.mynet is a pre-trained network. x1.size = [10,128,32,32].  I want to treat each of the 128 feature maps separately using self.mynet() and then concatenate them.
Following code works.
for i in range(x1.size()[1]):
            x = x1[:,i,:,:].unsqueeze(1)
            x = self.mynet(x)

but when I use concat or append, it will make error.
for i in range(x1.size()[1]):
            x = x1[:,i,:,:].unsqueeze(1)
            x = self.mynet(x)
            if i == 0:
                x_concat = x_sr
           else:
                x_concat = torch.cat([x_concat,x_sr],dim=1)

or append
for i in range(x1.size()[1]):
            x = x1[:,i,:,:].unsqueeze(1)
            x = self.mynet(x)
            mylist.append(x)

I do not know what is up.