Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for GaussianMixtureModel #108

Open
kaechb opened this issue Jan 18, 2022 · 2 comments
Open

Example for GaussianMixtureModel #108

kaechb opened this issue Jan 18, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@kaechb
Copy link

kaechb commented Jan 18, 2022

Hi,
Could you add an example for the GaussianMixtureModel and how you integrate that into the GraphINN or just refer me to a code snippet where you used the GaussianMixtureModel? From the documentation it is very unclear to me how this can be done - is there a reason that the subnet is not given similarly as an constructor in the case of the affine coupling layer?
I've read the https://arxiv.org/pdf/2003.05739.pdf, which made the algorithmic aspect a lot more understandable but I do not see how it can be implemented.
Cheers

@wapu
Copy link
Collaborator

wapu commented Jun 24, 2022

Hi kaechb,
And sorry for taking that long to get back to you! I wrote that report and I've implemented the GMM module in FrEIA, and I agree that it is not clear enough how it would be used.

In the attached file, you can see how it is supposed to work - setting up the invertible and conditioning networks, using the loss function and sampling from the trained GMM. The code is just an incomplete minimal example. I have not, in fact, tested this module for actual data, since my own GMM experiments were done with older and even more irritating code. I would therefore be very thankful for feedback on whether this works as expected or if you run into any problems!

Best,
Jakob

gmm_example.txt

@wapu
Copy link
Collaborator

wapu commented Jun 24, 2022

As for the subnet constructor question: The GMM module does not contain any networks itself, the way it is implemented. The entire parameterization comes from outside via the conditional inputs, which hopefully gives you more flexibility in how you come up with the GMM parameters.

@wapu wapu added enhancement New feature or request question Further information is requested labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants