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

Lint NNX BatchStat, Cache, Intermediate class docs in variablelib.py #4449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flax/nnx/variablelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ class Param(Variable[A]):

class BatchStat(Variable[A]):
"""The mean and variance batch statistics stored in
the :class:`BatchNorm` layer. Note, these are not the
the :class:`flax.nnx.BatchNorm` layer. Note that these are not the
learnable scale and bias parameters, but rather the
running average statistics that are typically used
during post-training inference::
Expand Down Expand Up @@ -662,7 +662,7 @@ class BatchStat(Variable[A]):


class Cache(Variable[A]):
"""Autoregressive cache in :class:`MultiHeadAttention`::
"""Autoregressive cache in :class:`flax.nnx.MultiHeadAttention`::

>>> from flax import nnx
>>> import jax, jax.numpy as jnp
Expand Down Expand Up @@ -698,8 +698,8 @@ class Cache(Variable[A]):


class Intermediate(Variable[A]):
""":class:`Variable` type that is typically used for
:func:`Module.sow`::
"""A :class:`flax.nnx.Variable` type that is typically used for
:func:`flax.nnx.Module.sow`::

>>> from flax import nnx
>>> import jax, jax.numpy as jnp
Expand Down
Loading