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

Function AverageEval

tensorflow/lite/experimental/micro/kernels/pooling.cc:150–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150TfLiteStatus AverageEval(TfLiteContext* context, TfLiteNode* node) {
151 auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data);
152 OpData data;
153
154 const TfLiteTensor* input = GetInput(context, node, kInputTensor);
155 TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
156
157 TF_LITE_ENSURE_STATUS(CalculateOpData(context, params, input, output, &data));
158
159 // Inputs and outputs share the same type, guarenteed by the converter.
160 switch (input->type) {
161 case kTfLiteFloat32:
162 AverageEvalFloat(context, node, params, &data, input, output);
163 break;
164 case kTfLiteUInt8:
165 AverageEvalUint8(context, node, params, &data, input, output);
166 break;
167 default:
168 context->ReportError(context, "Input type %s is not currently supported",
169 TfLiteTypeGetName(input->type));
170 return kTfLiteError;
171 }
172 return kTfLiteOk;
173}
174
175TfLiteStatus MaxEval(TfLiteContext* context, TfLiteNode* node) {
176 auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data);

Callers

nothing calls this directly

Calls 7

GetInputFunction · 0.85
GetOutputFunction · 0.85
AverageEvalUint8Function · 0.85
TfLiteTypeGetNameFunction · 0.85
CalculateOpDataFunction · 0.70
AverageEvalFloatFunction · 0.70
ReportErrorMethod · 0.45

Tested by

no test coverage detected