Commit 1c003809 authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Remove 'graph' argument from FuncGraph.__init__.

With the old behavior you'd have to supply a graph argument in order
to inherit state from the eager context, which doesn't make much
sense. To keep it simple, I removed the argument and made it
unconditionally inherit state from the current context or default
graph.

In addition, this reuses the current graph's collections instead of
copying them. This allows collections to be modified from inside a
FuncGraph. This is necessary for cond_v2 (at least until collections
go away?).

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