Nice code ! I learned a lot from you code. However, I still have a question about class 'EmbeddingNet' in the networks.py .
I noticed that, the output's size of the 'EmbeddingNet' is (2). So I worried about the embedding of input sample is too small. And when we use this embedding to caculate the triplet loss. It may have some problem.