I have a multi modal network with a forward function as below:
def forward(self, x):    # x.shape torch.Size([1, 2, 200, 100])
    
    x1= x.data[0][0,:,:] # torch.Size([200, 100])
    x2= x.data[0][1,:,:]  # torch.Size([200, 100])
    out_x1 = self.conv(x1)
    out_x2 = self.conv(x2)

The input x is of shape torch.Size([1, 2, 200, 100]), i.e [batch=1, ch=2, height=200, width=100 ] and I want x1 to be first channel and x2 to be second channel. If I use:
x1= x.data[0][0,:,:]
then I only get height and width, torch.Size([200, 100]), which will not work in self.conv, which expect  torch.Size([1, 1, 200, 100]). How should I extract x1 and x2 from x to get the 4-dimensions that I need?
Thank you!