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

tflchef operator builder for Gelu More...

#include <Gelu.h>

Collaboration diagram for tflchef::TFliteOpGelu:

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 Gelu

Definition at line 28 of file Gelu.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 30 of file Gelu.cpp.

31{
32 tflchef::Operation *operation = ctx->chefop;
33 const tflite::Operator *op = ctx->tflop;
34
35 auto op_params = op->builtin_options_as_GeluOptions();
36
37 operation->set_type("Gelu");
38
39 auto *op_options = operation->mutable_gelu_options();
40
41 op_options->set_approximate(op_params->approximate());
42
43 return operation;
44}

References tflchef::RecipeChefContext::chefop, and tflchef::RecipeChefContext::tflop.

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file Gelu.cpp.

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

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