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

Function ConvertVector

tensorflow/lite/graph_info_test.cc:26–30  ·  view source on GitHub ↗

Makes a TfLiteIntArray* from std::vector, must free with TfLiteIntFree().

Source from the content-addressed store, hash-verified

24
25// Makes a TfLiteIntArray* from std::vector, must free with TfLiteIntFree().
26TfLiteIntArray* ConvertVector(const std::vector<int>& x) {
27 TfLiteIntArray* lite = TfLiteIntArrayCreate(x.size());
28 for (size_t i = 0; i < x.size(); i++) lite->data[i] = x[i];
29 return lite;
30}
31
32// A very simple test graph that supports setting in/out tensors on nodes.
33class SimpleTestGraph : public GraphInfo {

Callers 2

AddNodeMethod · 0.85
PartitionGraphFunction · 0.85

Calls 2

TfLiteIntArrayCreateFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected