MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __nonzero__

Method __nonzero__

tensorflow/python/framework/ops.py:767–775  ·  view source on GitHub ↗

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`.

(self)

Source from the content-addressed store, hash-verified

765 self._disallow_bool_casting()
766
767 def __nonzero__(self):
768 """Dummy method to prevent a tensor from being used as a Python `bool`.
769
770 This is the Python 2.x counterpart to `__bool__()` above.
771
772 Raises:
773 `TypeError`.
774 """
775 self._disallow_bool_casting()
776
777 def eval(self, feed_dict=None, session=None):
778 """Evaluates this tensor in a `Session`.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected