Giter Club home page Giter Club logo

Comments (2)

VincentStimper avatar VincentStimper commented on July 24, 2024 1

Hi @noetits,

It is possible to use real NVP with an odd number of dimensions. In this case, the variable is split into two parts of size (latent_size // 2 +1 , latent_size // 2). Since the first part goes into the parameter map, which computes the parameters for the second part, we need to change the following:

param_map = nf.nets.MLP([(latent_size + 1) // 2, 64, 64, latent_size // 2 * 2], init_zeros=True)

This should work for both even and odd dimensions.

Note that this depends on the kind of Split you use. Also, if you do not use a scale, as in NICE, you need to drop the factor of 2 in the output units, since there will be only one parameter per dimension, i.e. the shift.

Best regards,
Vincent

from normalizing-flows.

noetits avatar noetits commented on July 24, 2024

I just realized this might be a theoretical constraint
RNVP-even-N drawio
https://en.wikipedia.org/wiki/Flow-based_generative_model

Maybe it would be be good to have an error message disclosing this?

Now I am wondering if there would be a workaround on this, like adding a dummy variable that it e.g. a uniform distribution (or other if better), or if this would not be a good idea for some reason

from normalizing-flows.

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.