Commit 19a795bf authored by Akshay Agrawal's avatar Akshay Agrawal Committed by TensorFlower Gardener
Browse files

Introduce Eager-specific and Graph-specific Python TensorArray classes,

and refactor the Python TensorArray class to wrap an instance of one of
these two classes; the particular class to instantiate is chosen by
consulting whether the context is in graph or eager mode.

TensorArrays in Eager are simply Python lists of EagerTensor objects;
most operations on an _EagerTensorArray object pass through to array_ops.

This change is meant to ensure compatibility of Eager execution with existing
code bases (e.g., code using control_flow_ops) that use TensorArray objects. Eager users will be better served by maintaining their own lists of EagerTensors.

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