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

Method GetStringValues

tensorflow/lite/delegates/flex/test_util.cc:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38std::vector<string> FlexModelTest::GetStringValues(int tensor_index) const {
39 std::vector<string> result;
40
41 TfLiteTensor* tensor = interpreter_->tensor(tensor_index);
42 auto num_strings = GetStringCount(tensor->data.raw);
43 for (size_t i = 0; i < num_strings; ++i) {
44 auto ref = GetString(tensor->data.raw, i);
45 result.push_back(string(ref.str, ref.len));
46 }
47
48 return result;
49}
50
51void FlexModelTest::SetShape(int tensor_index, const std::vector<int>& values) {
52 ASSERT_EQ(interpreter_->ResizeInputTensor(tensor_index, values), kTfLiteOk);

Callers

nothing calls this directly

Calls 4

GetStringCountFunction · 0.85
GetStringFunction · 0.85
tensorMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected