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

Function IsSparseTensorValueType

tensorflow/python/util/util.cc:483–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481};
482
483bool IsSparseTensorValueType(PyObject* o) {
484 PyObject* sparse_tensor_value_type = GetRegisteredType("SparseTensorValue");
485 if (TF_PREDICT_FALSE(sparse_tensor_value_type == nullptr)) {
486 return false;
487 }
488
489 return PyObject_TypeCheck(
490 o, reinterpret_cast<PyTypeObject*>(sparse_tensor_value_type)) == 1;
491}
492
493// Returns 1 if `o` is an instance of CompositeTensor.
494// Returns 0 otherwise.

Callers 2

IsSequenceForDataHelperFunction · 0.85
GetValueIteratorForDataFunction · 0.85

Calls 1

GetRegisteredTypeFunction · 0.85

Tested by

no test coverage detected