message: Add support for len calls on tensor lists.
diff: @@ -27,6 +27,7 @@ from tensorflow.contrib.autograph.utils import type_check
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  +from tensorflow.python.ops import list_ops
  from tensorflow.python.ops import logging_ops
  from tensorflow.python.ops import math_ops
  @@ -50,7 +51,9 @@ def dynamic_builtin(f, *args, **kwargs):
  def dynamic_len(list_or_tensor):
  """Implementation of len using dynamic dispatch."""
  - if tensor_util.is_tensor(list_or_tensor):
  + if _is_tensor_list(list_or_tensor):
  + return list_ops.tensor_list_length(list_or_tensor)
  + elif tensor_util.is_tensor(list_or_tensor):
  shape = list_or_tensor.shape
  if not shape.ndims:
  raise ValueError(
  @@ -59,6 +62,11 @@ def dynamic_len(list_or_tensor):
  return len(list_or_tensor)
  +def _is_tensor_list(list_or_tensor):
  + return (tensor_util.is_tensor(list_or_tensor)
  + and list_or_tensor.dtype == dtypes.variant)
  +
  +
  def dynamic_int(num_or_tensor, **kwargs):
  """Implementation of int() using dynamic dispatch."""
  if tensor_util.is_tensor(num_or_tensor):
  