-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adding support + examples for FCN based INNs #76
Comments
Hi cheers |
Hey thank you for the comment! Im glad to hear that a FCN addition would be appreciated. I was about to start implementing it for our own use so I am glad to hear it would be useful to you. I will implement FCN and add some examples in the coming days, but meanwhile if you want to play around you should be able to implement your scenario by putting the N dimension across channel like this:
That should work well, we have had success by working on vectors in that fashion. Although I am very curious about the increase in performance that we would get by doing it with truly FCN. Will keep you updated on my observations soon! If N is odd then you can hack it by stacking the vector on itself to get it to even:
The evenness is not a FCN problem that is just a code problem that I will fix in a bit. As @mloubout mentions this also depends on if you want unconditional network as the example I have shown or if you are doing a conditional network. It is actually easier for the conditional case because you can mismatch channel dims between x and the condition. |
Thank you both for the quick yet thorough answers! Thanks for the code snippets @rafaelorozco! I tried to use the channel dim too, but then stumbled on the even channel issue and did not know enough about the mechanisms to know if simply duplicating the odd input dimensions would not brake the invertibility or the general gist of INNs. Good to know, that this is more a code design thingy, I can play around with this solution for now! I'm more interested in the unconditional case. So I will just use your little hack for now, even though there is a performance penalty for doubling the input dimensions I guess. @mloubout I do not care about the exact architecture right now - the model just needs to be a trainable nonlinear bijection. Everything else is just a matter of which architecture is the most SoTA & performant one. Thanks again & good to know that this is work in progress! |
Hello @flo-he The main added functionality is a glow coupling layer that has a dense layer as the neural net backbone working for inputs that look like this: You can find an example on how to build a dense Glow network here https://github.com/slimgroup/InvertibleNetworks.jl/blob/dense/examples/networks/network_glow_dense.jl See this line to see how you could Some things that need to be taken care off: I tried the network on our sanity-check rosenbrock 2dim distribution. It seems to be on par with convolutional network but of course the dense network should shine for larger dimensions. |
Hi @rafaelorozco, sorry for the delayed response - was on vacation for the last two weeks. Thanks for the effort, I will play around with it in the coming week(s). And let you know if I encounter any strange behavior. |
Marking as closed since I merged this to the main branch but please reopen if you want to discuss some more. |
Hi there!
I'm trying to learn diffeomorphisms between manifolds and wanted to use INNs for this task. That is I want to map points of some manifold$x \in\mathcal{M}$ embedded in $\mathbb{R}^N$ to some other manifold $\mathcal{N} \subset \mathbb{R}^N$ via an INN.
I do not quite get how I might implement this task using your package, as all building blocks seem be based on convolutional architectures.$x$ should be a (N, 1, 1, B) tensor, where B is the batch size. But then the problem arises, that for (all?) coupling layers, the number of channels has to be even (i.e. splittable).
For my problem, at last in my understanding,
I just wanted to ask what the plan is on adding support (+ MWE) for a simple (N, B) matrix layout as inputs to the INN and simple building blocks based on fully connected networks (FCN). I think this would be highly appreciated by the community as your package is currently the go-to for INNs in Julia!
The text was updated successfully, but these errors were encountered: