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

NNX documentation missing pooling operations #4271

Open
tux-type opened this issue Oct 8, 2024 · 5 comments
Open

NNX documentation missing pooling operations #4271

tux-type opened this issue Oct 8, 2024 · 5 comments
Assignees

Comments

@tux-type
Copy link

tux-type commented Oct 8, 2024

The NNX API reference does not seem to have entries for pooling operations like nnx.avg_pool or nnx.max_pool.

@cgarciae
Copy link
Collaborator

cgarciae commented Oct 9, 2024

@8bitmp3

@8bitmp3 8bitmp3 self-assigned this Oct 28, 2024
@8bitmp3
Copy link
Collaborator

8bitmp3 commented Oct 28, 2024

thanks @tux-type @cgarciae

@8bitmp3
Copy link
Collaborator

8bitmp3 commented Nov 11, 2024

@jorisSchaller
Copy link
Contributor

Hey,
I was also looking at the pooling, the flax/core/nn/ __init__.py file import the function from the old linen API.

from flax.linen.pooling import (avg_pool as avg_pool, max_pool as max_pool)

But the entire file uses only

import jax.numpy as jnp
import numpy as np
from jax import lax

We should copy it to flax/core/nn/pooling.py in order to have have it in the new nnx API.
We should also copy the pooling doc from https://github.com/google/flax/blob/main/docs/api_reference/flax.linen/layers.rst#pooling to a new file called docs_nnx/api_reference/flax.nnx/nn/pooling.rst to have up to date nnx documentation

If you agree with the changes, I can send a PR with them.

@cgarciae
Copy link
Collaborator

@jorisSchaller happy to review the PR!

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

4 participants