parameters: (self)
docstring: Dummy method to prevent a tensor from being used as a Python `bool`.
  
      This is the Python 2.x counterpart to `__bool__()` above.
  
      Raises:
        `TypeError`.
docstring_summary: Dummy method to prevent a tensor from being used as a Python `bool`.
docstring_tokens: Dummy method to prevent a tensor from being used as a Python bool .
function: def __nonzero__(self):
      """Dummy method to prevent a tensor from being used as a Python `bool`.
  
      This is the Python 2.x counterpart to `__bool__()` above.
  
      Raises:
        `TypeError`.
      """
      raise TypeError("Using a `tf.Tensor` as a Python `bool` is not allowed. "
                      "Use `if t is not None:` instead of `if t:` to test if a "
                      "tensor is defined, and use the logical TensorFlow ops "
                      "to test the value of a tensor.")
function_tokens: def __nonzero__ ( self ) : raise TypeError ( "Using a `tf.Tensor` as a Python `bool` is not allowed. " "Use `if t is not None:` instead of `if t:` to test if a " "tensor is defined, and use the logical TensorFlow ops " "to test the value of a tensor." )