Neural Spline Flow (NSF) based on coupling layers #68
Answered
by
francois-rozet
austin-hoover
asked this question in
Q&A
-
|
Hi all, Have any of you implemented the Neural Spline Flow (NSF) model in Zuko using coupling transformations rather than autoregressive transformations? Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
francois-rozet
Sep 9, 2025
Replies: 2 comments
-
|
Hi @austin-hoover, There are several ways to get a NSF with coupling transformations.
zuko.flows.NSF(5, 3, transforms=4, passes=2, bins=8)
bins = 8
zuko.flows.NICE(
5,
3,
transforms=4,
univariate=zuko.transforms.MonotonicRQSTransform,
shapes=[[bins], [bins], [bins - 1]],
)
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
francois-rozet
-
|
Thanks for the help!
…On Tue, Sep 9, 2025 at 8:41 AM François Rozet ***@***.***> wrote:
Hi @austin-hoover <https://github.com/austin-hoover>,
There are several ways to get a NSF with coupling transformations.
1. Use the zuko.flows.NSF class with passes=2 (which makes the
autoregressive transform equivalent to a coupling one).
zuko.flows.NSF(5, 3, transforms=4, passes=2, bins=8)
2. Use the zuko.flows.NICE class but change the univariate function to
MonotonicRQSTransform.
bins = 8zuko.flows.NICE(
5,
3,
transforms=4,
univariate=zuko.transforms.MonotonicRQSTransform,
shapes=[[bins], [bins], [bins - 1]],
)
3. Build your own flow with zuko.lazy.Flow and
zuko.flows.GeneralCouplingTransform.
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN2TFLS4ODRB75CI6HWMVMD3R3DFXAVCNFSM6AAAAACF6ISP76VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZVGEZTMOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @austin-hoover,
There are several ways to get a NSF with coupling transformations.
zuko.flows.NSFclass withpasses=2(which makes the autoregressive transform equivalent to a coupling one).zuko.flows.NICEclass and set the univariate function toMonotonicRQSTransform.zuko.lazy.Flowandzuko.flows.GeneralCouplingTransform.