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

tflchef operator builder for Squeeze More...

#include <Squeeze.h>

Collaboration diagram for tflchef::TFliteOpSqueeze:

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 Squeeze

Definition at line 28 of file Squeeze.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 30 of file Squeeze.cpp.

31{
32 tflchef::Operation *operation = ctx->chefop;
33 const tflite::Operator *op = ctx->tflop;
34
35 auto op_params = op->builtin_options_as_SqueezeOptions();
36 assert(op_params != nullptr);
37
38 operation->set_type("Squeeze");
39
40 auto op_options = operation->mutable_squeeze_options();
41
42 std::vector<int32_t> squeeze_dims = as_index_vector(op_params->squeeze_dims());
43
44 for (auto dim : squeeze_dims)
45 {
46 op_options->add_squeeze_dim(dim);
47 }
48
49 return operation;
50}
std::vector< T > as_index_vector(const flatbuffers::Vector< T > *flat_array)
Definition Convert.h:47

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file Squeeze.cpp.

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

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