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

Function ShapeIsVector

tensorflow/lite/kernels/reshape.cc:104–107  ·  view source on GitHub ↗

Check if the shape tensor is valid. Shapes should be int32 vectors.

Source from the content-addressed store, hash-verified

102
103// Check if the shape tensor is valid. Shapes should be int32 vectors.
104inline 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
109TfLiteIntArray* GetOutputShape(TfLiteContext* context, TfLiteNode* node) {
110 if (NumInputs(node) == 2 && ShapeIsVector(context, node)) {

Callers 1

GetOutputShapeFunction · 0.85

Calls 1

GetInputFunction · 0.85

Tested by

no test coverage detected