code: def _fD(self, neg_pairs, A):
      
      diff = neg_pairs[:, 0, :] - neg_pairs[:, 1, :]
      return np.log(np.sum(np.sqrt(np.sum(np.dot(diff, A) * diff, axis=1))) + 1e-6)
docs: The value of the dissimilarity constraint function.
  
      f = f(\sum_{ij \in D} distance(x_i, x_j))
      i.e. distance can be L1:  \sqrt{(x_i-x_j)A(x_i-x_j)'}