parameters: (input_,
               data=None,
               message=None,
               first_n=None,
               summarize=20,
               print_tensor_name=True,
               print_tensor_type=True,
               print_shape=True,
               summarize_indicator_vector=True,
               name=None)
return_statement: return input_
docstring: Creates a print op that will print when a tensor is accessed.
  
    Wraps the tensor passed in so that whenever that tensor is accessed,
    the message `message` is printed, along with the current value of the
    tensor `t` and an optional list of other tensors.
  
    Args:
      input_: A Tensor/SparseTensor/TensorArray to print when it is evaluated.
      data: A list of other tensors to print.
      message: A string message to print as a prefix.
      first_n: Only log `first_n` number of times. Negative numbers log always;
               this is the default.
      summarize: Print this number of elements in the tensor.
      print_tensor_name: Print the tensor name.
      print_tensor_type: Print the tensor type.
      print_shape: Print the tensor's shape.
      summarize_indicator_vector: Whether to print the index of the first true
        value in an indicator vector (a Boolean tensor).
      name: The name to give this op.
  
    Returns:
      A Print op. The Print op returns `input_`.
  
    Raises:
      ValueError: If the tensor `input_` is not a Tensor, SparseTensor or
        TensorArray.
docstring_summary: Creates a print op that will print when a tensor is accessed.
docstring_tokens: Creates a print op that will print when a tensor is accessed .
function: def print_op(input_,
               data=None,
               message=None,
               first_n=None,
               summarize=20,
               print_tensor_name=True,
               print_tensor_type=True,
               print_shape=True,
               summarize_indicator_vector=True,
               name=None):
    """Creates a print op that will print when a tensor is accessed.
  
    Wraps the tensor passed in so that whenever that tensor is accessed,
    the message `message` is printed, along with the current value of the
    tensor `t` and an optional list of other tensors.
  
    Args:
      input_: A Tensor/SparseTensor/TensorArray to print when it is evaluated.
      data: A list of other tensors to print.
      message: A string message to print as a prefix.
      first_n: Only log `first_n` number of times. Negative numbers log always;
               this is the default.
      summarize: Print this number of elements in the tensor.
      print_tensor_name: Print the tensor name.
      print_tensor_type: Print the tensor type.
      print_shape: Print the tensor's shape.
      summarize_indicator_vector: Whether to print the index of the first true
        value in an indicator vector (a Boolean tensor).
      name: The name to give this op.
  
    Returns:
      A Print op. The Print op returns `input_`.
  
    Raises:
      ValueError: If the tensor `input_` is not a Tensor, SparseTensor or
        TensorArray.
  
    """
  
    message = message or ""
    if input_ is None:
      raise ValueError("input_ must be of type "
                       "Tensor, SparseTensor or TensorArray")
  
    tensor_list = _get_tensor_repr(input_, print_tensor_name, print_tensor_type,
                                   print_shape, summarize_indicator_vector)
  
    if data is not None:
      for t in data:
        tensor_list.extend(_get_tensor_repr(t, print_tensor_name,
                                            print_tensor_type, print_shape,
                                            summarize_indicator_vector))
  
    if isinstance(input_, ops.Tensor):
      input_ = logging_ops.Print(input_, tensor_list, message, first_n, summarize,
                                 name)
    elif isinstance(input_, ops.SparseTensor):
      p = logging_ops.Print(
          constant_op.constant([]), tensor_list, message, first_n, summarize,
          name)
  
      with ops.control_dependencies([p]):
        input_ = ops.SparseTensor(array_ops.identity(input_.indices),
                                  array_ops.identity(input_.values),
                                  array_ops.identity(input_.shape))
    elif isinstance(input_, tensor_array_ops.TensorArray):
      p = logging_ops.Print(
          constant_op.constant([]), tensor_list, message, first_n, summarize,
          name)
  
      with ops.control_dependencies([p]):
        input_ = tensor_array_ops.TensorArray(dtype=input_.dtype,
                                              handle=input_.handle)
    else:
      raise ValueError("input_ must be of type "
                       "Tensor, SparseTensor or TensorArray")
  
    return input_
function_tokens: def print_op ( input_ , data = None , message = None , first_n = None , summarize = 20 , print_tensor_name = True , print_tensor_type = True , print_shape = True , summarize_indicator_vector = True , name = None ) : message = message or "" if input_ is None : raise ValueError ( "input_ must be of type " "Tensor, SparseTensor or TensorArray" ) tensor_list = _get_tensor_repr ( input_ , print_tensor_name , print_tensor_type , print_shape , summarize_indicator_vector ) if data is not None : for t in data : tensor_list . extend ( _get_tensor_repr ( t , print_tensor_name , print_tensor_type , print_shape , summarize_indicator_vector ) ) if isinstance ( input_ , ops . Tensor ) : input_ = logging_ops . Print ( input_ , tensor_list , message , first_n , summarize , name ) elif isinstance ( input_ , ops . SparseTensor ) : p = logging_ops . Print ( constant_op . constant ( [ ] ) , tensor_list , message , first_n , summarize , name ) with ops . control_dependencies ( [ p ] ) : input_ = ops . SparseTensor ( array_ops . identity ( input_ . indices ) , array_ops . identity ( input_ . values ) , array_ops . identity ( input_ . shape ) ) elif isinstance ( input_ , tensor_array_ops . TensorArray ) : p = logging_ops . Print ( constant_op . constant ( [ ] ) , tensor_list , message , first_n , summarize , name ) with ops . control_dependencies ( [ p ] ) : input_ = tensor_array_ops . TensorArray ( dtype = input_ . dtype , handle = input_ . handle ) else : raise ValueError ( "input_ must be of type " "Tensor, SparseTensor or TensorArray" ) return input_