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

Simplify and extend the management of input-conditional losses and updates.

Instead of keeping track of dependencies manually, we rely on the TF graph structure to find dependencies. The resulting implementation is cleaner and more robust.

This does not change any existing behavior. It extends the current behavior by allowing `get_updates_for(inputs)` and `get_losses_for(inputs)` to be called from *any* tensors upstream of the layer, not just the immediate layer's inputs.

PiperOrigin-RevId: 185168680
parent b37913a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment