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

Method SetStringValues

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

Source from the content-addressed store, hash-verified

26bool FlexModelTest::Invoke() { return interpreter_->Invoke() == kTfLiteOk; }
27
28void FlexModelTest::SetStringValues(int tensor_index,
29 const std::vector<string>& values) {
30 DynamicBuffer dynamic_buffer;
31 for (const string& s : values) {
32 dynamic_buffer.AddString(s.data(), s.size());
33 }
34 dynamic_buffer.WriteToTensor(interpreter_->tensor(tensor_index),
35 /*new_shape=*/nullptr);
36}
37
38std::vector<string> FlexModelTest::GetStringValues(int tensor_index) const {
39 std::vector<string> result;

Callers

nothing calls this directly

Calls 5

AddStringMethod · 0.80
WriteToTensorMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
tensorMethod · 0.45

Tested by

no test coverage detected