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

tflchef operator builder for CAST More...

#include <Cast.h>

Collaboration diagram for tflchef::TFliteOpCast:

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 CAST

Definition at line 28 of file Cast.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 30 of file Cast.cpp.

31{
32 tflchef::Operation *operation = ctx->chefop;
33 const tflite::Operator *op = ctx->tflop;
34
35 auto op_params = op->builtin_options_as_CastOptions();
36 assert(op_params != nullptr);
37
38 operation->set_type("Cast");
39
40 auto op_options = operation->mutable_cast_options();
41
42 op_options->set_in_data_type(as_tflchef_type(op_params->in_data_type()));
43 op_options->set_out_data_type(as_tflchef_type(op_params->out_data_type()));
44
45 return operation;
46}
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::TFliteOpCast::filler ( const tflite::Operator *  op,
TFliteImport import,
tflchef::ModelRecipe *  model_recipe 
) const
overridevirtual

Implements tflchef::TFliteOpChef.

Definition at line 24 of file Cast.cpp.

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

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