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

#include <FullyConnected.h>

Collaboration diagram for FullyConnectedChef:

Public Member Functions

 FullyConnectedChef (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
 
 FullyConnectedChef (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 FullyConnected.h.

Constructor & Destructor Documentation

◆ FullyConnectedChef() [1/2]

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

Definition at line 25 of file FullyConnected.h.

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

◆ FullyConnectedChef() [2/2]

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

Definition at line 25 of file FullyConnected.h.

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

Member Function Documentation

◆ code() [1/2]

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

Implements OpChef.

Definition at line 31 of file FullyConnected.h.

32 {
33 return circle::BuiltinOperator_FULLY_CONNECTED;
34 }

◆ code() [2/2]

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

Implements OpChef.

Definition at line 31 of file FullyConnected.h.

32 {
33 return tflite::BuiltinOperator_FULLY_CONNECTED;
34 }

◆ type() [1/2]

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

Implements OpChef.

Definition at line 36 of file FullyConnected.h.

37 {
38 return circle::BuiltinOptions_FullyConnectedOptions;
39 }

◆ type() [2/2]

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

Implements OpChef.

Definition at line 36 of file FullyConnected.h.

37 {
38 return tflite::BuiltinOptions_FullyConnectedOptions;
39 }

◆ value() [1/2]

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

Implements OpChef.

Definition at line 22 of file FullyConnected.cpp.

23{
24 auto &operation = (*_operation);
25
26 assert(operation.has_fullyconnected_options());
27
28 auto circle_activation = as_circle_activation(operation.fullyconnected_options().activation());
29
30 circle::FullyConnectedOptionsBuilder fc_options_builder{fbb};
31 fc_options_builder.add_fused_activation_function(circle_activation);
32 fc_options_builder.add_keep_num_dims(operation.fullyconnected_options().keep_num_dims());
33
34 return fc_options_builder.Finish().Union();
35}
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().

◆ value() [2/2]

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

Implements OpChef.


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