Commit 8852be3e authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Fix fix Defun logic when returning a value captured from an outer scope.

Previously, the following would fail:

```python
c = tf.constant(...)
@Defun(...)
def Foo(...):
  return c
```

The fix involves ensuring that every output of the function is a member of the function graph, and invoking the capturing logic if it is not.

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