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

Function MaxEvalFloat

tensorflow/lite/kernels/pooling.cc:206–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204
205template <KernelType kernel_type>
206void MaxEvalFloat(TfLiteContext* context, TfLiteNode* node,
207 TfLitePoolParams* params, OpData* data,
208 const TfLiteTensor* input, TfLiteTensor* output) {
209 float activation_min, activation_max;
210 CalculateActivationRange(params->activation, &activation_min,
211 &activation_max);
212#define TF_LITE_MAX_POOL(type) \
213 tflite::PoolParams op_params; \
214 op_params.stride_height = params->stride_height; \
215 op_params.stride_width = params->stride_width; \
216 op_params.filter_height = params->filter_height; \
217 op_params.filter_width = params->filter_width; \
218 op_params.padding_values.height = data->padding.height; \
219 op_params.padding_values.width = data->padding.width; \
220 op_params.float_activation_min = activation_min; \
221 op_params.float_activation_max = activation_max; \
222 type::MaxPool(op_params, GetTensorShape(input), GetTensorData<float>(input), \
223 GetTensorShape(output), GetTensorData<float>(output))
224 if (kernel_type == kReference) {
225 TF_LITE_MAX_POOL(reference_ops);
226 } else {
227 TF_LITE_MAX_POOL(optimized_ops);
228 }
229#undef TF_LITE_MAX_POOL
230}
231
232template <KernelType kernel_type>
233void MaxEvalQuantizedUInt8(TfLiteContext* context, TfLiteNode* node,

Callers

nothing calls this directly

Calls 1

CalculateActivationRangeFunction · 0.85

Tested by

no test coverage detected