parameters: (name, tensor)
return_statement: return fc.real_valued_column(name, dimension=dimension, dtype=tensor.dtype)
docstring: Creates a real_valued_column for given tensor and name.
docstring_summary: Creates a real_valued_column for given tensor and name.
docstring_tokens: Creates a real_valued_column for given tensor and name .
function: def _infer_real_valued_column_for_tensor(name, tensor):
    """Creates a real_valued_column for given tensor and name."""
    if isinstance(tensor, sparse_tensor_py.SparseTensor):
      raise ValueError(
          'SparseTensor is not supported for auto detection. Please define '
          'corresponding FeatureColumn for tensor {} {}.', name, tensor)
  
    if not (tensor.dtype.is_integer or tensor.dtype.is_floating):
      raise ValueError(
          'Non integer or non floating types are not supported for auto detection'
          '. Please define corresponding FeatureColumn for tensor {} {}.', name,
          tensor)
  
    shape = tensor.get_shape().as_list()
    dimension = 1
    for i in range(1, len(shape)):
      dimension *= shape[i]
    return fc.real_valued_column(name, dimension=dimension, dtype=tensor.dtype)
function_tokens: def _infer_real_valued_column_for_tensor ( name , tensor ) : if isinstance ( tensor , sparse_tensor_py . SparseTensor ) : raise ValueError ( 'SparseTensor is not supported for auto detection. Please define ' 'corresponding FeatureColumn for tensor {} {}.' , name , tensor ) if not ( tensor . dtype . is_integer or tensor . dtype . is_floating ) : raise ValueError ( 'Non integer or non floating types are not supported for auto detection' '. Please define corresponding FeatureColumn for tensor {} {}.' , name , tensor ) shape = tensor . get_shape ( ) . as_list ( ) dimension = 1 for i in range ( 1 , len ( shape ) ) : dimension *= shape [ i ] return fc . real_valued_column ( name , dimension = dimension , dtype = tensor . dtype )