Giter Site home page Giter Site logo

Comments (3)

DianeBouchacourt avatar DianeBouchacourt commented on June 5, 2024

After a bit more digging, I think the problem comes from the fact that indexes are selected but the view() operation

samples_zCx = samples_zCx.expand(len_dataset, latent_dim, n_samples)
is reordering in a wrong manner, permute is the correct way to do it. Indeed, I've checked by taking the first 10000 samples, which are also the first 10000 samples in mean. With the view() operation it does not return the same values as in mean (which it should since the samples are mean values). I replaced with permute and it works as expected.

Thus I think it should be:

    samples_zCx = samples_zCx.index_select(0, samples_x).permute(1,0)
    samples_zCx = samples_zCx.unsqueeze(0).expand(len_dataset, latent_dim, n_samples)

in place of

samples_zCx = samples_zCx.index_select(0, samples_x).view(latent_dim, n_samples)
and
samples_zCx = samples_zCx.expand(len_dataset, latent_dim, n_samples)

from disentangling-vae.

YannDubs avatar YannDubs commented on June 5, 2024

Awesome thanks Diane, a few others had open issues for that but there was no solutions (I don't actively work on that anymore). Do you think you could send a PR ?

ideally, it would use samples instead of the mean , but I think it's more urgent to have the correct permutations !

from disentangling-vae.

DianeBouchacourt avatar DianeBouchacourt commented on June 5, 2024

Let me check my code again, and I will ! I also need to do a PR just for these changes (I edited quite some stuff in the fork I created).

from disentangling-vae.

Related Issues (20)

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.