Skip to content

Understanding SoftclipTransform #10

Answered by francois-rozet
arnauqb asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @arnauqb 👋

transforms is the sequence of transformations $f_0, f_1, \dots f_n$ from the feature space towards the latent space. In order words, $z = f_n \circ \dots \circ f_1 \circ f_0(x)$ . When sampling, the order of the transformations is reversed, meaning that $x = f_0^{-1} \circ f_1^{-1} \circ \dots \circ f_n^{-1}(z)$.

Therefore, if you want your samples to be bounded, the inverse of the first transformation $f_0^{-1}$ should be the SoftclipTransform, but, in your snippet, you made the last transformation $f_n$ the SoftclipTransform.

The easiest solution is to insert the inverse SoftclipTransform at the front of the transforms list.

class MyFlow(zuko.flows.MAF):
    def __init__(

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@felixdivo
Comment options

@francois-rozet
Comment options

Answer selected by arnauqb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #9 on January 27, 2023 12:35.