google / google/flax

Add "DotGetter" style variable and submodule accessors?

Open
#749 1 comment 0 reactions 1 assignee Claimed by @levskaya View on GitHub
Priority: P2 - no schedule
Dominant language
Jupyter Notebook
Stars
7.3k
Forks
833
Avg merge
5h 11m
Merged PRs (30d)
5

Description

This would allow accessing variables defined in a `nn.compact`-wrapped method via `module.kernel` rather than `module.variables['param']['kernel']`

Notably, we already have a check that disallows defining variables with the same name in different collections, or submodules with the same name as a variable, so this should be safe.

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.