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

tflchef operator builder for While More...

#include <While.h>

Collaboration diagram for tflchef::TFliteOpWhile:

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 While

Definition at line 28 of file While.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 36 of file While.cpp.

37{
38 tflchef::Operation *operation = ctx->chefop;
39 const tflite::Operator *op = ctx->tflop;
40
41 auto op_params = op->builtin_options_as_WhileOptions();
42 assert(op_params != nullptr);
43
44 operation->set_type("While");
45
46 auto op_options = operation->mutable_while_options();
47
48 op_options->set_body_subgraph_index(op_params->body_subgraph_index());
49 op_options->set_cond_subgraph_index(op_params->cond_subgraph_index());
50
51 return operation;
52}

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 25 of file While.cpp.

27{
28 const auto &inputs = *op->inputs();
29
30 for (int input : inputs)
31 {
32 fill_tensor_to_import(input, import);
33 }
34}
void fill_tensor_to_import(int32_t idx, TFliteImport *import)

References tflchef::fill_tensor_to_import().


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