Triplet dataloader

Is there any suggestion for triplet data loader that can feed a TripletMarginLoss?

there is no Triplet dataloader (it does not make sense). Depending on your dataset, you can write a custom collate_fn for your DataLoader as well as a custom Dataset to achieve this.

See for details on collate_fn and Dataset