ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tflchef::TFliteOpL2Pool2D Class Reference

tflchef operator builder for L2_POOL_2D More...

#include <L2Pool2D.h>

Collaboration diagram for tflchef::TFliteOpL2Pool2D:

Public Member Functions

void filler (const tflite::Operator *op, TFliteImport *import, tflchef::ModelRecipe *model_recipe) const override
 
tflchef::Operation * build (RecipeChefContext *ctx) const override
 
- Public Member Functions inherited from tflchef::TFliteOpChef
virtual ~TFliteOpChef ()
 

Detailed Description

tflchef operator builder for L2_POOL_2D

Definition at line 28 of file L2Pool2D.h.

Member Function Documentation

◆ build()

tflchef::Operation * tflchef::TFliteOpL2Pool2D::build ( RecipeChefContext ctx) const
overridevirtual

Implements tflchef::TFliteOpChef.

Definition at line 30 of file L2Pool2D.cpp.

31{
32 tflchef::Operation *operation = ctx->chefop;
33 const tflite::Operator *op = ctx->tflop;
34
35 auto op_params = op->builtin_options_as_Pool2DOptions();
36 assert(op_params != nullptr);
37
38 operation->set_type("L2Pool2D");
39
40 auto op_options = operation->mutable_l2pool2d_options();
41
42 op_options->set_padding(as_tflchef_padding(op_params->padding()));
43 op_options->set_stride_h(op_params->stride_h());
44 op_options->set_stride_w(op_params->stride_w());
45 op_options->set_filter_height(op_params->filter_height());
46 op_options->set_filter_width(op_params->filter_width());
47 op_options->set_activation(as_tflchef_activation(op_params->fused_activation_function()));
48
49 return operation;
50}
tflchef::Padding as_tflchef_padding(const tflite::Padding padding)
Definition Convert.cpp:71
tflchef::Activation as_tflchef_activation(const tflite::ActivationFunctionType type)
Definition Convert.cpp:50

References tflchef::as_tflchef_activation(), tflchef::as_tflchef_padding(), tflchef::RecipeChefContext::chefop, and tflchef::RecipeChefContext::tflop.

◆ filler()

void tflchef::TFliteOpL2Pool2D::filler ( const tflite::Operator *  op,
TFliteImport import,
tflchef::ModelRecipe *  model_recipe 
) const
overridevirtual

Implements tflchef::TFliteOpChef.

Definition at line 24 of file L2Pool2D.cpp.

26{
27 // Nothing to do with filler
28}

The documentation for this class was generated from the following files: