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

Method SetShape

tensorflow/lite/kernels/kernel_util_test.cc:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 void SetShape(TfLiteTensor* tensor, std::initializer_list<int> dims) {
44 TfLiteTensorFree(tensor);
45 tensor->dims = TfLiteIntArrayCreate(dims.size());
46 int i = 0;
47 for (const auto& d : dims) {
48 tensor->dims->data[i] = d;
49 ++i;
50 }
51 }
52
53 std::vector<int> GetShape(TfLiteIntArray* dims) {
54 std::vector<int> result;

Callers

nothing calls this directly

Calls 3

TfLiteTensorFreeFunction · 0.85
TfLiteIntArrayCreateFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected