Skip to content

Commit

Permalink
Merge pull request #3942 from google:fix-nnx-basics-notebook
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 638584553
  • Loading branch information
Flax Authors committed May 30, 2024
2 parents 144486b + e30754d commit 6e63497
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/nnx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Features
.. div:: sd-font-normal

NNX makes it very easy integrate objects with regular JAX code
via the `Functional API <nnx_basics#the-functional-api>`__.
via the `Functional API <nnx_basics.html#the-functional-api>`__.

Basic usage
^^^^^^^^^^^^
Expand Down
13 changes: 13 additions & 0 deletions docs/nnx/nnx_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
"that have allowed Linen to scale effectively to large codebases."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"skip-execution"
]
},
"outputs": [],
"source": [
"! pip install -U flax penzai"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
6 changes: 6 additions & 0 deletions docs/nnx/nnx_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ like PyTorch.
Despite its simplified implementation, NNX supports the same powerful design patterns
that have allowed Linen to scale effectively to large codebases.

```{code-cell} ipython3
:tags: [skip-execution]
! pip install -U flax penzai
```

```{code-cell} ipython3
from flax import nnx
import jax
Expand Down

0 comments on commit 6e63497

Please sign in to comment.