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
Loading
Please sign in to comment