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

tflchef operator builder for Tile More...

#include <Tile.h>

Collaboration diagram for tflchef::TFliteOpTile:

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 Tile

Definition at line 28 of file Tile.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 38 of file Tile.cpp.

39{
40 tflchef::Operation *operation = ctx->chefop;
41 const tflite::Operator *op = ctx->tflop;
42
43 operation->set_type("Tile");
44
45 return operation;
46}

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file Tile.cpp.

26{
27 // filler for second input
28 const auto &inputs = *op->inputs();
29
30 const tflite::Tensor *tensor = import->tensors()->Get(inputs[1]);
31 assert(tensor->type() == tflite::TensorType::TensorType_INT32 ||
32 tensor->type() == tflite::TensorType::TensorType_INT64);
33 const tflite::Buffer *buffer = import->buffers()->Get(tensor->buffer());
34 auto vec = extract_buffer<int32_t>(buffer);
35 import->set_tensor_filler(inputs[1], vec);
36}

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