1Konny / FactorVAE

Pytorch implementation of FactorVAE proposed in Disentangling by Factorising(http://arxiv.org/abs/1802.05983)
MIT License
262 stars 48 forks source link

D_tc_loss line 119 in solver.py #14

Open goodman1204 opened 4 years ago

goodman1204 commented 4 years ago

I am not sure about the following code, can someone help to explain it?
D_tc_loss = 0.5*(F.cross_entropy(D_z, zeros) + F.cross_entropy(D_z_pperm, ones))

charan223 commented 4 years ago

They are just increasing the values of label 0 for D_z, and label 1 for D_z_pperm