PyTorch-GAN icon indicating copy to clipboard operation
PyTorch-GAN copied to clipboard

Why there is nn.softmax before nn.crossentroyloss in infogan?

Open Lucksong opened this issue 5 years ago • 2 comments

In 111 line of the implementaion of infogan, nn.softmax is added to aux_layer. But the returned data of aux_layer is used to compute crossentropy loss in 277 line. Doesn`t nn.crossentropyloss module integrated functions of log_softmax and nllloss?

Lucksong avatar Dec 14 '19 07:12 Lucksong

One more thing, sample_image() function is for verification, shouldn`t we set the model to test mode firstly?

Lucksong avatar Dec 16 '19 02:12 Lucksong

In 111 line of the implementaion of infogan, nn.softmax is added to aux_layer. But the returned data of aux_layer is used to compute crossentropy loss in 277 line. Doesn`t nn.crossentropyloss module integrated functions of log_softmax and nllloss?

I also think nn.softmax is not needed here.

mo666666 avatar Sep 02 '20 08:09 mo666666