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

Function EncodeTensorNameSlice

tensorflow/core/util/saved_tensor_slice_util.cc:28–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26const char kSavedTensorSlicesKey[] = "";
27
28string EncodeTensorNameSlice(const string& name, const TensorSlice& slice) {
29 string buffer;
30 // All the tensor slice keys will start with a 0
31 tensorflow::strings::OrderedCode::WriteNumIncreasing(&buffer, 0);
32 tensorflow::strings::OrderedCode::WriteString(&buffer, name);
33 tensorflow::strings::OrderedCode::WriteNumIncreasing(&buffer, slice.dims());
34 for (int d = 0; d < slice.dims(); ++d) {
35 // A trivial extent (meaning we take EVERYTHING) will default to -1 for both
36 // start and end. These will be properly parsed.
37 tensorflow::strings::OrderedCode::WriteSignedNumIncreasing(&buffer,
38 slice.start(d));
39 tensorflow::strings::OrderedCode::WriteSignedNumIncreasing(&buffer,
40 slice.length(d));
41 }
42 return buffer;
43}
44
45Status DecodeTensorNameSlice(const string& code, string* name,
46 tensorflow::TensorSlice* slice) {

Callers 12

SaveBloomFilterFunction · 0.85
RestoreBloomFilterFunction · 0.85
SaveHashTableHelperFunction · 0.85
InsertTableFunction · 0.85
CopySliceDataMethod · 0.85
GetDataMethod · 0.85
AddMethod · 0.85
TESTFunction · 0.85
AddSliceMethod · 0.85
FixMergeHashTableBundlesFunction · 0.85
GetSliceValueMethod · 0.85
BuildV2VarMapsMethod · 0.85

Calls 3

dimsMethod · 0.45
startMethod · 0.45
lengthMethod · 0.45

Tested by 2

GetDataMethod · 0.68
TESTFunction · 0.68