Commit f0c4d581 authored by Francois Chollet's avatar Francois Chollet Committed by TensorFlower Gardener
Browse files

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
parent c406a363
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment