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