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

Function IsResourceVariableHelper

tensorflow/python/util/util.cc:273–278  ·  view source on GitHub ↗

Returns 1 if `o` is a ResourceVariable. Returns 0 otherwise. Returns -1 if an error occurred.

Source from the content-addressed store, hash-verified

271// Returns 0 otherwise.
272// Returns -1 if an error occurred.
273int IsResourceVariableHelper(PyObject* o) {
274 static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) {
275 return IsInstanceOfRegisteredType(to_check, "ResourceVariable");
276 });
277 return check_cache->CachedLookup(o);
278}
279
280// Returns 1 if `o` is a ResourceVariable.
281// Returns 0 otherwise.

Callers 1

IsResourceVariableFunction · 0.85

Calls 2

CachedLookupMethod · 0.80

Tested by

no test coverage detected