Make Layer base class track nested sublayers' weights, updates, and losses.
This enables users to create nested layers without having to subclass Model instead (commonly requested feature). Note that automatic tracking of lists of layers via CheckpointableDatastructure is not yet supported. Due to backwards compatibility concerns, we don't force users to call Layer's super __init__ before any other logic for the tracking to take place (unlike what we did in Model). PiperOrigin-RevId: 225477916
Loading
Please sign in to comment