Added minibatch support to MarginRankingCriterion and PairwiseDistance.