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

Function CheckResourceVariable

tensorflow/python/eager/pywrap_tfe_src.cc:2145–2153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2143}
2144
2145bool CheckResourceVariable(PyObject* item) {
2146 if (tensorflow::swig::IsResourceVariable(item)) {
2147 tensorflow::Safe_PyObjectPtr handle(
2148 PyObject_GetAttrString(item, "_handle"));
2149 return EagerTensor_CheckExact(handle.get());
2150 }
2151
2152 return false;
2153}
2154
2155bool IsNumberType(PyObject* item) {
2156#if PY_MAJOR_VERSION >= 3

Callers 4

CheckOneInputFunction · 0.85
MaybeGetDTypeFunction · 0.85
ConvertToTensorFunction · 0.85

Calls 2

IsResourceVariableFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected