Commit 9d782598 authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Add "element_shape" attr to TensorListConcat and use it in _GraphTensorArrayV2.

When using while_v2, this change prevents errors like this:
  All except the first dimension must be fully defined when concating an empty tensor list. element_shape: <unknown>

Previously, TensorListConcat op could only determine the element size
from the TensorList object at runtime. In the case of a while loop
that executes zero times, it wouldn't be able to determine the size
since no element was ever seen by the runtime. However, we may have
determined the element size during graph construction, so we use the
attribute to tell the runtime what the element size is.

Note that the original TensorArray implementation already does this.

PiperOrigin-RevId: 227750868
parent 7c9323be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment