The answer is: create batch of your input data and split them after computing output from the model.
Example (assuming that anchor, positive, negative are tensors in CHW format):
anchor, positive, negative = get_data()
x = Variable(torch.stack([anchor, positive, negative],0))
output = model(x)
out_anchor = output[torch.LongTensor([0])]
out_positive = output[torch.LongTensor([1])]
out_negative = output[torch.LongTensor([2])]