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

tflchef operator builder for ReverseSequence More...

#include <ReverseSequence.h>

Collaboration diagram for tflchef::TFliteOpReverseSequence:

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 ReverseSequence

Definition at line 28 of file ReverseSequence.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 34 of file ReverseSequence.cpp.

35{
36 tflchef::Operation *operation = ctx->chefop;
37 const tflite::Operator *op = ctx->tflop;
38
39 operation->set_type("ReverseSequence");
40
41 auto op_params = op->builtin_options_as_ReverseSequenceOptions();
42
43 assert(op_params != nullptr);
44
45 auto op_options = operation->mutable_reverse_sequence_options();
46
47 op_options->set_seq_dim(op_params->seq_dim());
48 op_options->set_batch_dim(op_params->batch_dim());
49
50 return operation;
51}

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 25 of file ReverseSequence.cpp.

27{
28 const std::vector<int32_t> &inputs = as_index_vector(op->inputs());
29 assert(inputs.size() == 2);
30
31 fill_tensor_to_import(inputs[1], import);
32}
std::vector< T > as_index_vector(const flatbuffers::Vector< T > *flat_array)
Definition Convert.h:47
void fill_tensor_to_import(int32_t idx, TFliteImport *import)

References tflchef::as_index_vector(), and tflchef::fill_tensor_to_import().


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