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

Allow using the hk.* version of JAX transforms outside of hk.transform #17

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

ibab
Copy link
Contributor

@ibab ibab commented Mar 1, 2020

Right now the hk version of the JAX transforms fail when used outside of hk.transform with IndexError: deque index out of range.
This PR changes the transforms to fall back to the Jax versions when not used with Haiku models.

Alternatively we would throw a clean error saying that users should use jax.* instead.

@trevorcai
Copy link
Contributor

I would prefer if we threw an error saying to use the JAX versions of these transforms instead.

@ibab
Copy link
Contributor Author

ibab commented Mar 1, 2020

Done.

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

Successfully merging this pull request may close these issues.

None yet

3 participants