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

Method GetData

tensorflow/core/util/tensor_slice_writer_test.cc:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125} // namespace
126
127void TensorSliceWriteTestHelper::GetData(TensorSliceReader::Table* table,
128 const string& name,
129 const TensorSlice& slice,
130 SavedSlice* ss) {
131 string key = EncodeTensorNameSlice(name, slice);
132 string value;
133 EXPECT_TRUE(table->Get(key, &value));
134 SavedTensorSlices sts;
135 EXPECT_TRUE(ParseProtoUnlimited(&sts, value));
136 EXPECT_FALSE(sts.has_meta());
137 *ss = sts.data();
138 EXPECT_EQ(name, ss->name());
139 TensorSlice slice2(ss->slice());
140 EXPECT_EQ(slice.DebugString(), slice2.DebugString());
141}
142
143void TensorSliceWriteTestHelper::CheckEntries(const string& fname) {
144 TensorSliceReader::Table* tptr;

Callers 1

GetNextInternalMethod · 0.45

Calls 7

EncodeTensorNameSliceFunction · 0.85
ParseProtoUnlimitedFunction · 0.85
sliceMethod · 0.80
nameMethod · 0.65
GetMethod · 0.45
dataMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected