google / google/flax

How to freeze parameters with `nnx` and `optax`?

Open
#4,167 10 comments 5 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
7.3k
Forks
833
Avg merge
5h 11m
Merged PRs (30d)
5

Description

I would like to know what is the best way to freeze parameters in a model using `nnx` and `optax` (https://flax.readthedocs.io/en/latest/guides/training_techniques/transfer_learning.html#optax-multi-transform).

I think it would be useful to add an example to https://flax.readthedocs.io/en/latest/nnx/index.html.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.