Npair_loss_pytorch

Improved Deep Metric Learning with Multi-class N-pair Loss Objective

This implementation comes from tensorflow version. https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.py