Check if the shape tensor is valid. Shapes should be int32 vectors.
| 102 | |
| 103 | // Check if the shape tensor is valid. Shapes should be int32 vectors. |
| 104 | inline bool ShapeIsVector(TfLiteContext* context, TfLiteNode* node) { |
| 105 | const TfLiteTensor* shape = GetInput(context, node, kShapeTensor); |
| 106 | return (shape->dims->size == 1 && shape->type == kTfLiteInt32); |
| 107 | } |
| 108 | |
| 109 | TfLiteIntArray* GetOutputShape(TfLiteContext* context, TfLiteNode* node) { |
| 110 | if (NumInputs(node) == 2 && ShapeIsVector(context, node)) { |
no test coverage detected