Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/guides/flax_fundamentals/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In Flax Linen we can define `Module` arguments either as dataclass attributes or as arguments to methods (usually `__call__`).
Typically the distinction is clear:
* Completely fixed properties, such as the choice of kernel initializer or number of output features, are hyperparameters and should be defined as dataclass attributes. Typically two Module instances with different hyperparamaters cannot share in a meaningful way.
* Completely fixed properties, such as the choice of kernel initializer or number of output features, are hyperparameters and should be defined as dataclass attributes. Typically two Module instances with different hyperparameters cannot share in a meaningful way.
* Dynamic properties, such as input data and top-level "mode switches" like `train=True/False`, should be passed as arguments to `__call__` or another method.

Some cases are however less clear cut. Take for example the `Dropout` module.
Expand Down
2 changes: 1 addition & 1 deletion flax/core/lift.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ def cond(
Note that this constraint is violated when
creating variables or submodules in only one branch.
Because initializing variables in just one branch
causes the paramater structure to be different.
causes the parameter structure to be different.

Example::

Expand Down
Loading