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

#include <Squeeze.h>

Collaboration diagram for SqueezeChef:

Public Member Functions

 SqueezeChef (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 Squeeze.h.

Constructor & Destructor Documentation

◆ SqueezeChef()

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

Definition at line 25 of file Squeeze.h.

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

Member Function Documentation

◆ code()

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

Implements OpChef.

Definition at line 31 of file Squeeze.h.

31{ return tflite::BuiltinOperator_SQUEEZE; }

◆ type()

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

Implements OpChef.

Definition at line 33 of file Squeeze.h.

33{ return tflite::BuiltinOptions_SqueezeOptions; }

◆ value()

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

Implements OpChef.

Definition at line 23 of file Squeeze.cpp.

24{
25 auto &operation = (*_operation);
26
27 assert(operation.has_squeeze_options());
28
29 const auto &options = operation.squeeze_options();
30 // Note: 'CreateVector' should be placed before 'CreateOptions'
31 // Read flatbuffers.h 'void NotNested()' for more information
32 auto fb_squeeze_dims =
33 fbb.CreateVector(options.squeeze_dim().data(), options.squeeze_dim().size());
34
35 return tflite::CreateSqueezeOptions(fbb, fb_squeeze_dims).Union();
36}
Offset< Vector< T > > CreateVector(const T *v, size_t len)
Serialize an array into a FlatBuffer vector.

References flatbuffers::FlatBufferBuilder::CreateVector().


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