I think it should look like something like:
class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.conv_in_1 = nn.Conv2d(...)
        self.conv_in_2 = nn.Conv2d(...)
        self.conv_hidden = nn.Conv2d(...)
        self.fc_out_1 = nn.Linear(...)
        self.fc_out_2 = nn.Linear(...)

    def forward(self. x1, x2):
        x1 = F.relu(self.conv_in_1(x1))
        x2 = F.relu(self.conv_in_2(x2))
        x = torch.cat([x1,x2], dim)
        x = F.relu(self.conv_hidden(x))
        out1 = F.relu(self.fc_out_1(x.view(-1)))
        out2 = F.relu(self.fc_out_2(x.view(-1)))
        return out1, out2

net = Net()
optim = nn.SGD(net.parameters(), lr)

Then, you train it like this:
# CASE 1:
x1,x2, target1, _ = next_training_batch()
out1, _ = net(x1, x2.detach())
loss1 = criterion(out1, target1)
loss1.backward()
optim.step()

The important points are that x2 is detached (so you don’t backward through conv_in_2) and the loss is just wrt out1 (so you don’t backward through fc_out_2).