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

tflchef operator builder for BatchToSpaceND More...

#include <BatchToSpaceND.h>

Collaboration diagram for tflchef::TFliteOpBatchToSpaceND:

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 BatchToSpaceND

Definition at line 28 of file BatchToSpaceND.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 43 of file BatchToSpaceND.cpp.

44{
45 tflchef::Operation *operation = ctx->chefop;
46 const tflite::Operator *op = ctx->tflop;
47
48 operation->set_type("BatchToSpaceND");
49
50 return operation;
51}

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file BatchToSpaceND.cpp.

26{
27 // filler for second, third 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 const tflite::Buffer *buffer = import->buffers()->Get(tensor->buffer());
33 auto vec = extract_buffer<int32_t>(buffer);
34 import->set_tensor_filler(inputs[1], vec);
35
36 tensor = import->tensors()->Get(inputs[2]);
37 assert(tensor->type() == tflite::TensorType::TensorType_INT32);
38 buffer = import->buffers()->Get(tensor->buffer());
39 vec = extract_buffer<int32_t>(buffer);
40 import->set_tensor_filler(inputs[2], vec);
41}

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