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

Function GetValueIteratorForData

tensorflow/python/util/util.cc:548–560  ·  view source on GitHub ↗

Similar to above, just specialized for the functions in the data package.

Source from the content-addressed store, hash-verified

546
547// Similar to above, just specialized for the functions in the data package.
548ValueIteratorPtr GetValueIteratorForData(PyObject* nested) {
549 if (PyDict_Check(nested)) {
550 return absl::make_unique<DictValueIterator>(nested);
551 } else if (IsMappingHelper(nested)) {
552 return absl::make_unique<MappingValueIterator>(nested);
553 } else if (IsAttrsHelper(nested)) {
554 return absl::make_unique<AttrsValueIterator>(nested);
555 } else if (IsSparseTensorValueType(nested)) {
556 return absl::make_unique<SingleValueIterator>(nested);
557 } else {
558 return absl::make_unique<SequenceValueIterator>(nested);
559 }
560}
561
562// Similar to GetValueIterator above, but expands CompositeTensor and TypeSpec.
563ValueIteratorPtr GetValueIteratorForComposite(PyObject* nested) {

Callers

nothing calls this directly

Calls 3

IsMappingHelperFunction · 0.85
IsAttrsHelperFunction · 0.85
IsSparseTensorValueTypeFunction · 0.85

Tested by

no test coverage detected