ONE - On-device Neural Engine
Loading...
Searching...
No Matches
LocalResponseNormalizationChef Class Referencefinal

#include <LocalResponseNormalization.h>

Collaboration diagram for LocalResponseNormalizationChef:

Public Member Functions

 LocalResponseNormalizationChef (const tflchef::Operation *operation)
 
tflite::BuiltinOperator code (void) const override
 
tflite::BuiltinOptions type (void) const override
 
flatbuffers::Offset< void > value (flatbuffers::FlatBufferBuilder &fbb) const override
 
- Public Member Functions inherited from OpChef
virtual ~OpChef ()=default
 
virtual flatbuffers::Offset< flatbuffers::Vector< uint8_t > > custom_value (flatbuffers::FlatBufferBuilder &fbb) const
 
virtual ~OpChef ()=default
 
virtual flatbuffers::Offset< flatbuffers::Vector< uint8_t > > custom_value (flatbuffers::FlatBufferBuilder &fbb) const
 

Detailed Description

Definition at line 22 of file LocalResponseNormalization.h.

Constructor & Destructor Documentation

◆ LocalResponseNormalizationChef()

LocalResponseNormalizationChef::LocalResponseNormalizationChef ( const tflchef::Operation *  operation)
inlineexplicit

Definition at line 25 of file LocalResponseNormalization.h.

26 : _operation{operation}
27 {
28 // DO NOTHING
29 }

Member Function Documentation

◆ code()

tflite::BuiltinOperator LocalResponseNormalizationChef::code ( void  ) const
inlineoverridevirtual

Implements OpChef.

Definition at line 32 of file LocalResponseNormalization.h.

33 {
34 return tflite::BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION;
35 }

◆ type()

tflite::BuiltinOptions LocalResponseNormalizationChef::type ( void  ) const
inlineoverridevirtual

Implements OpChef.

Definition at line 37 of file LocalResponseNormalization.h.

38 {
39 return tflite::BuiltinOptions_LocalResponseNormalizationOptions;
40 }

◆ value()

flatbuffers::Offset< void > LocalResponseNormalizationChef::value ( flatbuffers::FlatBufferBuilder fbb) const
overridevirtual

Implements OpChef.

Definition at line 23 of file LocalResponseNormalization.cpp.

24{
25 auto &operation = (*_operation);
26
27 assert(operation.has_local_response_normalization_options());
28
29 auto &lrn_options = operation.local_response_normalization_options();
30
31 auto tflite_radius = lrn_options.radius();
32 auto tflite_bias = lrn_options.bias();
33 auto tflite_alpha = lrn_options.alpha();
34 auto tflite_beta = lrn_options.beta();
35
36 tflite::LocalResponseNormalizationOptionsBuilder lrn_options_builder{fbb};
37
38 lrn_options_builder.add_radius(tflite_radius);
39 lrn_options_builder.add_bias(tflite_bias);
40 lrn_options_builder.add_alpha(tflite_alpha);
41 lrn_options_builder.add_beta(tflite_beta);
42
43 return lrn_options_builder.Finish().Union();
44}
void Finish(Offset< T > root, const char *file_identifier=nullptr)
Finish serializing a buffer by writing the root offset.

References flatbuffers::FlatBufferBuilder::Finish().


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