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

tflchef operator builder for NON_MAX_SUPPRESSION_V4 More...

#include <NonMaxSuppressionV4.h>

Collaboration diagram for tflchef::TFliteOpNonMaxSuppressionV4:

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 NON_MAX_SUPPRESSION_V4

Definition at line 28 of file NonMaxSuppressionV4.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 45 of file NonMaxSuppressionV4.cpp.

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

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 25 of file NonMaxSuppressionV4.cpp.

27{
28 const auto &inputs = *op->inputs();
29
30 const tflite::Tensor *max_output_size_tensor = import->tensors()->Get(inputs[2]);
31 assert(max_output_size_tensor->type() == tflite::TensorType::TensorType_INT32);
32
33 const tflite::Tensor *iou_threshold_tensor = import->tensors()->Get(inputs[3]);
34 assert(iou_threshold_tensor->type() == tflite::TensorType::TensorType_FLOAT32);
35
36 const tflite::Tensor *score_threshold_tensor = import->tensors()->Get(inputs[4]);
37 assert(score_threshold_tensor->type() == tflite::TensorType::TensorType_FLOAT32);
38
39 for (int32_t index = 2; index < 5; ++index)
40 {
41 fill_tensor_to_import(inputs[index], import);
42 }
43}
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54
void fill_tensor_to_import(int32_t idx, TFliteImport *import)

References tflchef::fill_tensor_to_import().


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