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

Choice of Z by projection on unit sphere #1

Open
philippwulff opened this issue Dec 2, 2022 · 0 comments
Open

Choice of Z by projection on unit sphere #1

philippwulff opened this issue Dec 2, 2022 · 0 comments

Comments

@philippwulff
Copy link

philippwulff commented Dec 2, 2022

Hi, I know this project is a bit older, but I just read this part in the original paper and am kind of confused by it:

Screenshot 2022-12-02 at 15 13 35

I saw that you are projecting the Z vectors on the L2 unit sphere during initialisation (although you commented it out), but are you also doing it after every GLO update? I could not find that piece of code. Also, do you know what is the intuition behind doing this?

This is in model.py on line 13:

def _project_to_l2_ball(z):
    # return z / np.maximum(np.sqrt(np.sum(z**2, axis=1))[:, None], 1)
    # return z / np.sqrt(np.sum(z**2, axis=1))[:, None]
    # return z / np.max(np.sqrt(np.sum(z**2, axis=1))[:, None])
    return z

Thank you :)

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

1 participant