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

computing _u in planar flow #2

Open
BigTuna08 opened this issue Sep 8, 2020 · 1 comment
Open

computing _u in planar flow #2

BigTuna08 opened this issue Sep 8, 2020 · 1 comment

Comments

@BigTuna08
Copy link

I think in the self._u() method of your PlanarFlow class, you have

tf.math.sqrt(tf.reduce_sum(self.w ** 2.0)))

but it should be just
tf.reduce_sum(self.w ** 2.0))

as the paper uses the squared norm.

@FabricioArendTorres
Copy link

FabricioArendTorres commented Dec 16, 2022

Aside from that issue, this code does not restrict the u, so that the layer is invertible (w^t@u >-1).
Instead, the planar flow implementation basically reprojects the u, if w^t@u>-1 once it is not fulfilled anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants