tf.contrib.autograph.tensor_list(
elements,
element_dtype=None,
element_shape=None,
use_tensor_array=False
)
Defined in tensorflow/python/autograph/lang/special_functions.py
.
Creates an tensor list and populates it with the given elements.
This function provides a more uniform access to tensor lists and tensor arrays, and allows optional initialization.
Args:
elements
: Iterable[tf.Tensor, ...], the elements to initially fill the list withelement_dtype
: Optional[tf.DType], data type for the elements in the list; required if the list is emptyelement_shape
: Optional[tf.TensorShape], shape for the elements in the list; required if the list is emptyuse_tensor_array
: bool, whether to use the more compatible but restrictive tf.TensorArray implementation
Returns:
Union[tf.Tensor, tf.TensorArray], the new list.
Raises:
ValueError
: for invalid arguments