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

Function IsCompositeTensorHelper

tensorflow/python/util/util.cc:496–501  ·  view source on GitHub ↗

Returns 1 if `o` is an instance of CompositeTensor. Returns 0 otherwise. Returns -1 if an error occurred.

Source from the content-addressed store, hash-verified

494// Returns 0 otherwise.
495// Returns -1 if an error occurred.
496bool IsCompositeTensorHelper(PyObject* o) {
497 static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) {
498 return IsInstanceOfRegisteredType(to_check, "CompositeTensor");
499 });
500 return check_cache->CachedLookup(o);
501}
502
503// Returns 1 if `o` is an instance of TypeSpec, but is not TensorSpec.
504// Returns 0 otherwise.

Callers 2

IsCompositeTensorFunction · 0.85

Calls 2

CachedLookupMethod · 0.80

Tested by

no test coverage detected