Commit 5926ac2f authored by Allen Lavoie's avatar Allen Lavoie Committed by TensorFlower Gardener
Browse files

Automatically clean up tf.function reference cycles

Only works with autograph=False to start because of a function wrapping requirement which I've filed a bug for and will follow up on.

Attaches objects which clean up reference cycles to PolymorphicFunctions and the Functions the PolymorphicFunctions use internally. Right now it leaves reference cycles in concrete functions which are returned outside of a PolymorphicFunction, since we have dataset tests which hold on to the FuncGraph but not the Function (and users might do this too).

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