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

tflchef operator builder for PRelu More...

#include <PRelu.h>

Collaboration diagram for tflchef::TFliteOpPRelu:

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 PRelu

Definition at line 28 of file PRelu.h.

Member Function Documentation

◆ build()

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

Implements tflchef::TFliteOpChef.

Definition at line 34 of file PRelu.cpp.

35{
36 tflchef::Operation *operation = ctx->chefop;
37 const tflite::Operator *op = ctx->tflop;
38 operation->set_type("PRelu");
39
40 // PReluOptions are empty
41
42 return operation;
43}

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

◆ filler()

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

Implements tflchef::TFliteOpChef.

Definition at line 24 of file PRelu.cpp.

26{
27 const std::vector<int32_t> &inputs = as_index_vector(op->inputs());
28
29 assert(inputs.size() == 2);
30
31 import->set_tensor_filler(inputs.at(1)); // alpha
32}
std::vector< T > as_index_vector(const flatbuffers::Vector< T > *flat_array)
Definition Convert.h:47

References tflchef::as_index_vector().


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