An unoffical pytorch implementation of the soft nearest neighbours loss function and optimisation as in Frosst, N., Papernot, N., & Hinton, G. (2019). Analyzing and improving representations with the soft nearest neighbor loss. 36th International Conference on Machine Learning, ICML 2019, 2019-June, 3531–3547. https://arxiv.org/abs/1902.01889.