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

tflchef operator builder for Sub More...

#include <Sub.h>

Collaboration diagram for tflchef::TFliteOpSub:

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 Sub

Definition at line 28 of file Sub.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 33 of file Sub.cpp.

34{
35 tflchef::Operation *operation = ctx->chefop;
36 const tflite::Operator *op = ctx->tflop;
37
38 auto op_params = op->builtin_options_as_SubOptions();
39 assert(op_params != nullptr);
40
41 operation->set_type("Sub");
42
43 auto op_options = operation->mutable_sub_options();
44
45 auto tflchef_activation = as_tflchef_activation(op_params->fused_activation_function());
46 op_options->set_activation(tflchef_activation);
47
48 return operation;
49}
tflchef::Activation as_tflchef_activation(const tflite::ActivationFunctionType type)
Definition Convert.cpp:50

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 25 of file Sub.cpp.

27{
28 // Sub may have constant input
29
30 fill_two_inputs(op, import);
31}
void fill_two_inputs(const tflite::Operator *op, TFliteImport *import)

References tflchef::fill_two_inputs().


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