Skip to content
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
15 changes: 15 additions & 0 deletions flax/nnx/nn/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ def __call__(self, inputs: Array, out_sharding = None) -> Array:

Args:
inputs: The nd-array to be transformed.
out_sharding: Optional sharding specification (e.g.,
``jax.sharding.PartitionSpec``) for the output array. When using JAX's
explicit sharding mode with a mesh context with ``AxisType.Explicit``.
If ``None`` (default), the compiler automatically determines output
sharding.

Returns:
The transformed input.
Expand Down Expand Up @@ -398,6 +403,11 @@ def __call__(self, inputs: Array, out_sharding = None) -> Array:

Args:
inputs: The nd-array to be transformed.
out_sharding: Optional sharding specification (e.g.,
``jax.sharding.PartitionSpec``) for the output array. When using JAX's
explicit sharding mode with a mesh context with ``AxisType.Explicit``.
If ``None`` (default), the compiler automatically determines output
sharding.

Returns:
The transformed input.
Expand Down Expand Up @@ -532,6 +542,11 @@ def __call__(
the rhs being the learnable kernel. Exactly one of ``einsum_str``
in the constructor argument and call argument must be not None,
while the other must be None.
out_sharding: Optional sharding specification (e.g.,
``jax.sharding.PartitionSpec``) for the output array. When using JAX's
explicit sharding mode with a mesh context with ``AxisType.Explicit``.
If ``None`` (default), the compiler automatically determines output
sharding.

Returns:
The transformed input.
Expand Down