KinWaiCheuk / pytorch-triplet-loss

Triplet-net and triplet loss implementation on pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch Triplet Loss and Online Mining

Implementation of triplet loss, and online mining on Pytorch

This code is a PyTorch implementation of Olivier Moindrot's blog post https://omoindrot.github.io/triplet-loss and his github repository https://github.com/omoindrot/tensorflow-triplet-loss, who implement the triplet loss and online mining on Tensorflow.

My repository aims at implementing triplet loss with minimal amount of codes. See my Keras version here https://github.com/KinWaiCheuk/Triplet-net-keras (offline mining version)

alt text

Dependencies

pytorch >=1.3

sklearn >=0.19.1

matplotlib >=2.2.2

seaborn >=0.9

Instruction

All the required codes are contained inside the jupyter-notebook

About

Triplet-net and triplet loss implementation on pytorch


Languages

Language:Jupyter Notebook 98.6%Language:Python 1.4%