the model’s forward function is
def forward(self,x0, x1)
    output1 = self.forward_once(x0)
    output2 = self.forward_once(x1)
    return output1,output2

So, are the following two implementations different？
output1,output2 = model(x0, x1)
loss = criterion (output1,output2)
loss.backward()

And here is the another way:
output1 = model.forward_once(x0)
output2 = model.forward_once(x1)
loss = criterion (output1,output2)
loss.backward()

Are they different?