Giter VIP home page Giter VIP logo

michigan's Issues

How to interpret reconstruction loss of VAE

Hi i'm Dat Nguyen CS student who currently research on VAE and detect underlying pattern of single cell data. I did review your code and notice you have similar way of calculate loss of VAE.

Pytorch code

reproduction_loss = nn.functional.mse_loss(x_hat, x, reduction='none').sum(dim=1).mean()
KLD = torch.mean(-0.5 * torch.sum(1 + log_var - mean **
                     2 - log_var.exp(), dim=1), dim=0)

But the problem for this is reproduction_loss is too big since we only reduce it to mean ( batch size )

So my question is how could you interpret those loss and make sure that the model going to correct direction.

TC loss is negative

Hi! Thank you for sharing your codes!

When I look at your beta-TCVAE implementation, I found your TC loss is negative in FunctionProgramExamples/examples/example_beta_TCVAE.ipynb.

epoch: 98; iteration: 3168; beta-TCVAE loss:4330.94580078125; Total Correlation:-0.8152694702148438
epoch: 99; iteration: 3200; beta-TCVAE loss:4333.12744140625; Total Correlation:-1.0267829895019531

However, in principle, TC loss should be positive.
Why is your TC loss negative?

Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.