1Konny / FactorVAE

Pytorch implementation of FactorVAE proposed in Disentangling by Factorising(http://arxiv.org/abs/1802.05983)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The vae tc loss

cuicanyu opened this issue · comments

HI, Thanks your code, its very useful.
I notice that the tc_vae_loss in solver.py. It could be a negative number, and this is unusual for loss functions.

You might have already found the answer to this, but for future reference, vae_tc_loss as defined in this repo: vae_tc_loss = (D_z[:, :1] - D_z[:, 1:]).mean() is equivalent to FactorVAE's formulation in paper (see: https://github.com/paruby/FactorVAE/blob/b0ba3466e39ebd56d84db7a039ed39421aa1b21f/factor_vae.py#L151 (lines 151-156). That is, it can be negative by paper's definition as well.