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

tflchef operator builder for SHAPE More...

#include <Shape.h>

Collaboration diagram for tflchef::TFliteOpShape:

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 SHAPE

Definition at line 28 of file Shape.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 30 of file Shape.cpp.

31{
32 tflchef::Operation *operation = ctx->chefop;
33 const tflite::Operator *op = ctx->tflop;
34 operation->set_type("Shape");
35
36 auto op_params = op->builtin_options_as_ShapeOptions();
37 assert(op_params != nullptr);
38
39 auto op_options = operation->mutable_shape_options();
40 op_options->set_out_type(as_tflchef_type(op_params->out_type()));
41
42 return operation;
43}
tflchef::TensorType as_tflchef_type(const tflite::TensorType type)
Definition Convert.cpp:22

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file Shape.cpp.

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

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