Skip to content

Commit

Permalink
have TrainState subclass nnx.Module
Browse files Browse the repository at this point in the history
  • Loading branch information
chiamp committed Apr 1, 2024
1 parent f2bdcd8 commit 543686b
Show file tree
Hide file tree
Showing 12 changed files with 666 additions and 197 deletions.
1 change: 1 addition & 0 deletions docs/api_reference/flax.experimental.nnx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Experimental API. See the `NNX page <https://flax.readthedocs.io/en/latest/exper
nn/index
rnglib
spmd
training/index
transforms
variables

11 changes: 11 additions & 0 deletions docs/api_reference/flax.experimental.nnx/training/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
flax.experimental.nnx.nnx.training
----------------------------

Experimental API. See the `NNX page <https://flax.readthedocs.io/en/latest/experimental/nnx/index.html>`__ for more details.

.. toctree::
:maxdepth: 3

metrics
optimizer

15 changes: 15 additions & 0 deletions docs/api_reference/flax.experimental.nnx/training/metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Metrics
------------------------

.. automodule:: flax.experimental.nnx.metrics
.. currentmodule:: flax.experimental.nnx.metrics

.. autoclass:: Metric
:members:
.. autoclass:: Average
:members:
.. autoclass:: Accuracy
:members:
.. autoclass:: MultiMetric
:members:

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Optimizer
------------------------

.. automodule:: flax.experimental.nnx.optimizer
.. currentmodule:: flax.experimental.nnx.optimizer

.. autoclass:: Optimizer
:members:
Loading

0 comments on commit 543686b

Please sign in to comment.