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

Function GetOutputShapeFromTensor

tensorflow/lite/kernels/reshape.cc:70–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70inline TfLiteIntArray* GetOutputShapeFromTensor(TfLiteContext* context,
71 TfLiteNode* node) {
72 const TfLiteTensor* shape = GetInput(context, node, kShapeTensor);
73
74 TfLiteIntArray* output_shape = TfLiteIntArrayCreate(shape->dims->data[0]);
75 for (int i = 0; i < output_shape->size; ++i) {
76 output_shape->data[i] = shape->data.i32[i];
77 }
78
79 return output_shape;
80}
81
82inline TfLiteIntArray* GetOutputShapeFromParam(TfLiteContext* context,
83 TfLiteNode* node) {

Callers 1

GetOutputShapeFunction · 0.85

Calls 2

GetInputFunction · 0.85
TfLiteIntArrayCreateFunction · 0.85

Tested by

no test coverage detected