Commit 2a4ef768 authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

[eager]: Correctly handle slot variables inside a defun.

The change in function_test.py would fail with something like
the following without the corresponding changes to the non-test files.

  File "/tensorflow/python/training/adam.py", line 163, in _resource_apply_dense
    m = self.get_slot(var, "m")
  File "/tensorflow/python/training/optimizer.py", line 750, in get_slot
    return named_slots.get(_var_key(var), None)
  File "/tensorflow/python/training/optimizer.py", line 82, in _var_key
    return (var.op.graph, var.op.name)
  File "/tensorflow/python/ops/resource_variable_ops.py", line 693, in op
    return self._handle.op
  File "/tensorflow/python/framework/ops.py", line 867, in op
    "Tensor.op is meaningless when eager execution is enabled.")

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