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

#include <InstanceNorm.h>

Collaboration diagram for InstanceNormChef:

Public Member Functions

 InstanceNormChef (const circlechef::Operation *operation)
 
circle::BuiltinOperator code (void) const override
 
circle::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 InstanceNorm.h.

Constructor & Destructor Documentation

◆ InstanceNormChef()

InstanceNormChef::InstanceNormChef ( const circlechef::Operation *  operation)
inlineexplicit

Definition at line 25 of file InstanceNorm.h.

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

Member Function Documentation

◆ code()

circle::BuiltinOperator InstanceNormChef::code ( void  ) const
inlineoverridevirtual

Implements OpChef.

Definition at line 31 of file InstanceNorm.h.

32 {
33 return circle::BuiltinOperator_INSTANCE_NORM;
34 }

◆ type()

circle::BuiltinOptions InstanceNormChef::type ( void  ) const
inlineoverridevirtual

Implements OpChef.

Definition at line 36 of file InstanceNorm.h.

37 {
38 return circle::BuiltinOptions_InstanceNormOptions;
39 }

◆ value()

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

Implements OpChef.

Definition at line 21 of file InstanceNorm.cpp.

22{
23 auto &operation = (*_operation);
24
25 assert(operation.has_instance_norm_options());
26 auto circle_activation = as_circle_activation(operation.instance_norm_options().activation());
27
28 circle::InstanceNormOptionsBuilder options_builder{fbb};
29 options_builder.add_epsilon(operation.instance_norm_options().epsilon());
30 options_builder.add_fused_activation_function(circle_activation);
31
32 return options_builder.Finish().Union();
33}
circle::ActivationFunctionType as_circle_activation(const circlechef::Activation &value)
Definition Convert.cpp:36
void Finish(Offset< T > root, const char *file_identifier=nullptr)
Finish serializing a buffer by writing the root offset.

References as_circle_activation(), and flatbuffers::FlatBufferBuilder::Finish().


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