Skip to content

Simplify ToNNX access of Linen module methods #4766

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

IvyZX
Copy link
Collaborator

@IvyZX IvyZX commented May 30, 2025

Fixes #4758

For any Linen model m = ToNNX(linen_module) with custom method foo, user can now call those methods by:

y = m.foo(x)

instead of

y = m(x, method=m.module.foo)

@IvyZX IvyZX requested a review from cgarciae May 30, 2025 01:50
@IvyZX IvyZX force-pushed the bdg branch 2 times, most recently from 33f7841 to feee044 Compare June 5, 2025 19:56
@copybara-service copybara-service bot merged commit 21e64ec into google:main Jun 13, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access to submodules/members of a linen module after using toNNX is not possible
2 participants