Closed adrienju closed 4 years ago
@adrienju oui le mieux est de patcher la PR en continuant à pusher sur cette branche pour pouvoir continuer une discussion unique IMHO
Et aussi si tu peux juste répondre un truc, ne serait-ce qu'un pouce ou un ok sur les commentaires si-dessus ça me permet de savoir que t'as vu, et tu resolve conversation
quand t'as patché le truc ou qu'on est d'accord
Adding L1 and L2 losses + tests + classifier network. @vict0rsch I need your opinion on trainer.py line 139, we need a way to assign the right loss according to the yaml. Best way to it ?
Ready to merge after @vict0rsch's review
Adding L1 and L2 losses + tests + classifier network.
Cool thanks! still a couple of questions before it's done but we're almost there :)
@vict0rsch I need your opinion on trainer.py line 139, we need a way to assign the right loss according to the yaml. Best way to it ?
For now the way you've done it seems fine, we'll see if it needs refactoring in the long run but we can work with that
In my opinion we want the domains to be encoded like this we when we are training the classifier with l1 or l2 (and this is what we have right now) :
rf => [1, 0, 0, 0] rn => [0, 1, 0, 0] sf => [0, 0, 1, 0] sn => [0, 0, 0, 1]
But when we are training the generator we want :
rf => [0.25 , 0.25, 0.25, 0.25] rn => [0.25 , 0.25, 0.25, 0.25] sf => [0.25 , 0.25, 0.25, 0.25] sn => [0.25 , 0.25, 0.25, 0.25]
So the classifier being completely unsure means it would output 0.25 everywhere since the output sum to 1 and we have 4 logits. Are you agree ?
I agree with your other possibility do you want to include this mode in the classifier as well ?
OK when you put it like this it makes sense and I agree : the output vector is a distribution and we want it to be uniform across domains. It's just, we could represent domains as a joint distribution and have dependent dimensions (1-hot and 0.25) or as 2 independent distributions (real or sim for 1 dimension, flooded or not for the orhter) and have 2 ones in the vectors and 0.5 when backproping through the gen.
But nevermind let's continue with 1-h and 0.25 I agree 👍
Hello victor !
J'ai apporté les modifs sur ma première pull request, quand c'est comme ça tu préfères que j'en refasse une ou que j'update à la main sur la PR originale ?
Pour la loss (conversation gautier et yoshua), il semble que la convergence est meilleure quand tu utilises une l2 plutôt qu'une Cross-entropy. Si on utilise softmax + l2, il semble aussi qu'il est préférable de définir les labels de la façon suivante :
Entrainement du classifier :
Ground truth pour une image réel = (1, 0), pour une image sim = (0, 1)
Entrainement du générateur :
Ground truth pour une image réel = (0.5, 0.5) et pour une image sim = (0.5, 0.5) et pas (0, 1), (1, 0).
Point de débat avec gautier : doit-on mélanger dans un batch d'entrainement du classifier des données sim et réel afin de fournir un meilleur signal d'entrée à celui-ci ou peut-on l’entraîner séquentiellement comme c'est le cas pour le moment ?
J'ai lancé des tests pour voir ça je te fais un retour quand j'ai les résultats.
Bonne journée !
Le sam. 14 déc. 2019 à 06:24, Victor Schmidt notifications@github.com a écrit :