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

Method Lookup

tensorflow/core/util/tensor_bundle/tensor_bundle.cc:1065–1077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063}
1064
1065Status BundleReader::Lookup(StringPiece key, Tensor* val) {
1066 CHECK(val != nullptr);
1067 BundleEntryProto entry;
1068 TF_RETURN_IF_ERROR(GetBundleEntryProto(key, &entry));
1069
1070 if (entry.slices().empty()) {
1071 return GetValue(entry, val);
1072 } else {
1073 return GetSliceValue(
1074 key, entry,
1075 /* a full slice */ TensorSlice(TensorShape(entry.shape()).dims()), val);
1076 }
1077}
1078
1079Status BundleReader::LookupHeader(StringPiece tensor_key, int64 total_bytes) {
1080 BundleEntryProto entry;

Callers 4

ExpectFunction · 0.45
ExpectVariantFunction · 0.45
TESTFunction · 0.45

Calls 6

TensorSliceClass · 0.85
GetValueFunction · 0.50
TensorShapeClass · 0.50
emptyMethod · 0.45
dimsMethod · 0.45
shapeMethod · 0.45

Tested by 4

ExpectFunction · 0.36
ExpectVariantFunction · 0.36
TESTFunction · 0.36