parameters: (v, dtype=None, name=None, as_ref=False)
docstring: Utility function for converting a Variable to a Tensor.
docstring_summary: Utility function for converting a Variable to a Tensor.
docstring_tokens: Utility function for converting a Variable to a Tensor .
function: def _TensorConversionFunction(v, dtype=None, name=None, as_ref=False):  # pylint: disable=invalid-name
      """Utility function for converting a Variable to a Tensor."""
      _ = name
      if dtype and not dtype.is_compatible_with(v.dtype):
        raise ValueError(
            "Incompatible type conversion requested to type '%s' for variable "
            "of type '%s'" % (dtype.name, v.dtype.name))
      if as_ref:
        return v._ref()  # pylint: disable=protected-access
      else:
        return v.value()
function_tokens: def _TensorConversionFunction ( v , dtype = None , name = None , as_ref = False ) : # pylint: disable=invalid-name _ = name if dtype and not dtype . is_compatible_with ( v . dtype ) : raise ValueError ( "Incompatible type conversion requested to type '%s' for variable " "of type '%s'" % ( dtype . name , v . dtype . name ) ) if as_ref : return v . _ref ( ) # pylint: disable=protected-access else : return v . value ( )