You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs_nnx/guides/haiku_to_flax.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -410,7 +410,7 @@ To call those custom methods:
410
410
411
411
412
412
Transformations
413
-
===============
413
+
=======================
414
414
415
415
Both Haiku and `Flax transformations <https://flax.readthedocs.io/en/latest/guides/jax_and_nnx_transforms.html>`__ provide their own set of transforms that wrap `JAX transforms <https://jax.readthedocs.io/en/latest/key-concepts.html#transformations>`__ in a way that they can be used with ``Module`` objects.
416
416
@@ -497,7 +497,7 @@ The only difference is that Flax ``nnx.scan`` allows you to specify which axis t
497
497
498
498
499
499
Scan over layers
500
-
================
500
+
=======================
501
501
502
502
Most Haiku transforms should look similar with Flax, since they all wraps their JAX counterparts, but the scan-over-layers use case is an exception.
503
503
@@ -645,7 +645,7 @@ Now inspect the variable pytree on both sides:
645
645
646
646
647
647
Top-level Haiku functions vs top-level Flax modules
648
-
================
648
+
=======================
649
649
650
650
In Haiku, it is possible to write the entire model as a single function by using
651
651
the raw ``hk.{get,set}_{parameter,state}`` to define/access model parameters and
Copy file name to clipboardExpand all lines: docs_nnx/index.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ Python objects. Flax NNX is an evolution of the previous `Flax Linen <https://fl
17
17
API, and it took years of experience to bring a simpler and more user-friendly API.
18
18
19
19
.. note::
20
-
Flax Linen API is not going to be deprecated in the near future as most of Flax users still
21
-
rely on this API. However, new users are encouraged to use Flax NNX.
22
-
For existing Flax Linen users planning to move to Flax NNX, check out the `evolution guide <guides/linen_to_nnx.html>`_ and `Why Flax NNX <why.html>`_.
20
+
Flax Linen API is not going to be deprecated in the near future as most of Flax users still rely on this API. However, new users are encouraged to use Flax NNX. Check out `Why Flax NNX <why.html>`_ for a comparison between Flax NNX and Linen, and our reasoning to make the new API.
21
+
22
+
To move your Flax Linen codebase to Flax NNX, get familiarized with the API in `NNX Basics <https://flax.readthedocs.io/en/latest/nnx_basics.html>`_ and then start your move following the `evolution guide <guides/linen_to_nnx.html>`_.
0 commit comments