message: Alter documentation for convert_to_tensor, adding additional error thrown and removing on the internal method.
diff: @@ -1036,12 +1036,12 @@ def convert_to_tensor(value, dtype=None, name=None, preferred_dtype=None):
  `preferred_dtype` is not possible, this argument has no effect.
  Returns:
  - An `Output` based on `value`.
  + An `Tensor` based on `value`.
  Raises:
  - TypeError: If no conversion function is registered for `value`.
  + TypeError: If no conversion function is registered for `value` to `dtype`.
  RuntimeError: If a registered conversion function returns an invalid value.
  -
  + ValueError: If the `value` is a tensor not of given `dtype` in graph mode.
  """
  return convert_to_tensor_v2(value, dtype, preferred_dtype, name)
  @@ -1089,12 +1089,12 @@ def convert_to_tensor_v2(value, dtype=None, dtype_hint=None, name=None):
  name: Optional name to use if a new `Tensor` is created.
  Returns:
  - An `Output` based on `value`.
  + An `Tensor` based on `value`.
  Raises:
  - TypeError: If no conversion function is registered for `value`.
  + TypeError: If no conversion function is registered for `value` to `dtype`.
  RuntimeError: If a registered conversion function returns an invalid value.
  -
  + ValueError: If the `value` is a tensor not of given `dtype` in graph mode.
  """
  return internal_convert_to_tensor(
  value=value,
  @@ -1115,42 +1115,7 @@ def internal_convert_to_tensor(value,
  preferred_dtype=None,
  ctx=None,
  accept_symbolic_tensors=True):
  - """Converts the given `value` to an `Tensor`.
  -
  - This function converts Python objects of various types to `Tensor`
  - objects. It accepts `Tensor` objects, numpy arrays, Python lists,
  - and Python scalars. For example:
  -
  - This function can be useful when composing a new operation in Python
  - All standard Python op constructors apply this function to each of their
  - Tensor-valued inputs, which allows those ops to accept numpy arrays, Python
  - lists, and scalars in addition to `Tensor` objects.
  -
  - Args:
  - value: An object whose type has a registered `Tensor` conversion function.
  - dtype: Optional element type for the returned tensor. If missing, the
  - type is inferred from the type of `value`.
  - name: Optional name to use if a new `Tensor` is created.
  - as_ref: True if we want the mutable view of Variables, if applicable.
  - preferred_dtype: Optional element type for the returned tensor,
  - used when dtype is None. In some cases, a caller may not have a
  - dtype in mind when converting to a tensor, so preferred_dtype
  - can be used as a soft preference. If the conversion to
  - `preferred_dtype` is not possible, this argument has no effect.
  - ctx: Optional: The value of context.context().
  - accept_symbolic_tensors: Whether Keras graph tensors should be accepted as
  - a valid tensor type during eager execution.
  - If False, this function will raise an exception if it is passed such
  - a tensor during eager eager execution.
  -
  - Returns:
  - A `Tensor` based on `value`.
  -
  - Raises:
  - TypeError: If no conversion function is registered for `value`.
  - RuntimeError: If a registered conversion function returns an invalid value.
  -
  - """
  + """Implementation of the public convert_to_tensor."""
  if ctx is None: ctx = context.context()
  if isinstance(value, EagerTensor):
  if ctx.executing_eagerly():
  