This repo also looks fantastic, it looks like the author has even written up several of the popular triplet selection strategies into pytorch dataloaders https://github.com/adambielski/siamese-triplet 1.0k