Thanks @ptrblck  for helping me. But I am not sure whether I am getting it correctly or not. Do you mean
input1= input1.unsqueeze(0)
input2= input2.unsqueeze(0)

and
modelA.features[0]= nn.Conv2d(1, 64, kernel_size=3, stride=1, padding=1)

Can you please explain to me a little bit?