Precompute label masks for speed
Precompute label masks for speed

Snazz2001/metric-learn,all-umass/metric-learn,terrytangyuan/metric-learn,xuanhan863/metric-learn,tigerneil/metric-learn,JingheZ/metric-learn