The vae tc loss
cuicanyu opened this issue · comments
cuicanyu commented
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.
Robik Shrestha commented
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.