Actually I need the model to receive two source data at once, and calculate the distance between these pairs. And the distance is the component of my loss function. But during the backward, I hope model’s parameter being updated by the loss only once.