omoindrot / tensorflow-triplet-loss

Implementation of triplet loss in TensorFlow
https://omoindrot.github.io/triplet-loss
MIT License
1.12k stars 283 forks source link

Multi label training and Classification after training #11

Open iuria21 opened 6 years ago

iuria21 commented 6 years ago

Hi, first of all thanks for your great work! I'm using your code to topic clustering texts, and apparently it's working fine on the first tests with few classes. I have the problem that I want to train a multi-label classification (say, a text can have label "politics" and "opinion"). I know that the code should be changed for this purpose, but I want to know if you know if you know whether this model of triplet-loss will work with multi-label.

On the other hand, after trained a model, i want to use it to classify new or test images/texts. Say I have an image of a "7" and I want to predict it's embedding and calculate the distances to know what label is the "nearest" from it. How could it be done?

Thanks again for all.