Skip to content

Commit

Permalink
Fix train_state.TrainState.create rendering in Flax BatchNorm guide
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitmp3 authored Nov 24, 2022
1 parent 0e5baa8 commit de58b2a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/guides/batch_norm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ need to consider the following:
The updated ``batch_stats`` must be extracted from here.

.. codediff::
:title_left: No BatchNorm
:title_left: No BatchNorm
:title_right: With BatchNorm
:sync:

Expand All @@ -190,8 +190,7 @@ When integrating models that use ``BatchNorm`` into a training loop, the main ch
is handling the additional ``batch_stats`` state. To do this, you need to:

* Add a ``batch_stats`` field to a custom :meth:`flax.training.train_state.TrainState <flax.training.train_state.TrainState>` class.
* Pass the ``batch_stats`` values to the :meth:`train_state.TrainState.create
<train_state.TrainState.create>` method.
* Pass the ``batch_stats`` values to the :meth:`train_state.TrainState.create <train_state.TrainState.create>` method.

.. codediff::
:title_left: No BatchNorm
Expand Down

0 comments on commit de58b2a

Please sign in to comment.