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

Function _is_tensorflow_object

tensorflow/python/framework/test_util.py:651–658  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

649 """Finds existing Tensors, runs the test, checks for new Tensors."""
650
651 def _is_tensorflow_object(obj):
652 try:
653 return isinstance(obj,
654 (ops.Tensor, variables.Variable,
655 tensor_shape.Dimension, tensor_shape.TensorShape))
656 except ReferenceError:
657 # If the object no longer exists, we don't care about it.
658 return False
659
660 tensors_before = set(
661 id(obj) for obj in gc.get_objects() if _is_tensorflow_object(obj))

Callers 1

decoratorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected