Based on your previous post, your model would return 2  tensors:
return output1, output2

so outputs will contain both of these tensors.
Later you are appending both targets:
        loss_inputs = outputs
        if (target0,target1) is not None:
            target = (target0,target1)
            loss_inputs += target

so loss_inputs would contain 4 tensors, which will raise the error, since ContrastiveLoss will map them to:
def forward(self, output1, output2, target, size_average=False):

such that target1 will be used as size_average.