Hi all,
first off, thanks a lot for all the efforts and the great work, it's a pleasure to use TensorFlow!
Is there a public way to clear/invalidate the traced functions? In order to a) retrace it (with a changed Python state) and b) clear up the memory
The use-case is that a function is sometimes (Python) state based and therefore one would need to retrace it, basically invalidating the old trace and removing it.
I am aware that there are often ways around such a design, but sometimes there are None: if you build a model that depends on Python variable and run this a couple of times. Manually keeping track of changes is one thing (this is up to the user, clearly) but we cannot simply check for re-tracing _in general_ (since this would mean that we would also need to handle the re-tracing logic of Tensors).
How could we go about clearing the traced functions?
Best,
Jonas