ONE - On-device Neural Engine
Loading...
Searching...
No Matches
souschef::TensorFiller Class Reference

#include <TensorFiller.h>

Public Member Functions

virtual ~TensorFiller ()=default
 
void set_tensor_filler (uint32_t tensor_index)
 This will record the tensor by index, if it needs filler option, such as kernel, bias.
 
void set_tensor_filler (uint32_t tensor_index, std::vector< int32_t > &expvalues)
 This will store int32 filler values such as reshape information for the tensor.
 
void set_tensor_filler (uint32_t tensor_index, std::vector< float > &expvalues)
 
bool get_tensor_filler (uint32_t tensor_index)
 This will return true if the tensor by index, needs a filler option.
 
bool get_tensor_filler (uint32_t tensor_index, std::vector< int32_t > &expvalues)
 This will return true if the tensor by index, needs a int array filler option.
 
bool get_tensor_filler (uint32_t tensor_index, std::vector< float > &expvalues)
 
void clear_tensor_filler ()
 
void clear_tensor_filler_vint32 ()
 
void clear_tensor_filler_vfloat ()
 

Detailed Description

Definition at line 26 of file TensorFiller.h.

Constructor & Destructor Documentation

◆ ~TensorFiller()

virtual souschef::TensorFiller::~TensorFiller ( )
virtualdefault

Member Function Documentation

◆ clear_tensor_filler()

void souschef::TensorFiller::clear_tensor_filler ( )
inline

Definition at line 88 of file TensorFiller.h.

88{ _tensor_filler.clear(); }

Referenced by tflchef::TFliteImport::select_sub_graph().

◆ clear_tensor_filler_vfloat()

void souschef::TensorFiller::clear_tensor_filler_vfloat ( )
inline

Definition at line 92 of file TensorFiller.h.

92{ _tensor_filler_vfloat.clear(); }

Referenced by tflchef::TFliteImport::select_sub_graph().

◆ clear_tensor_filler_vint32()

void souschef::TensorFiller::clear_tensor_filler_vint32 ( )
inline

Definition at line 90 of file TensorFiller.h.

90{ _tensor_filler_vint32.clear(); }

Referenced by tflchef::TFliteImport::select_sub_graph().

◆ get_tensor_filler() [1/3]

bool souschef::TensorFiller::get_tensor_filler ( uint32_t  tensor_index)
inline

This will return true if the tensor by index, needs a filler option.

Definition at line 53 of file TensorFiller.h.

54 {
55 auto it = _tensor_filler.find(tensor_index);
56 if (it != _tensor_filler.end())
57 {
58 return it->second;
59 }
60 return false;
61 }

Referenced by circlechef::generate_recipe(), and tflchef::generate_recipe().

◆ get_tensor_filler() [2/3]

bool souschef::TensorFiller::get_tensor_filler ( uint32_t  tensor_index,
std::vector< float > &  expvalues 
)
inline

Definition at line 77 of file TensorFiller.h.

78 {
79 auto it = _tensor_filler_vfloat.find(tensor_index);
80 if (it != _tensor_filler_vfloat.end())
81 {
82 expvalues = it->second;
83 return true;
84 }
85 return false;
86 }

◆ get_tensor_filler() [3/3]

bool souschef::TensorFiller::get_tensor_filler ( uint32_t  tensor_index,
std::vector< int32_t > &  expvalues 
)
inline

This will return true if the tensor by index, needs a int array filler option.

Definition at line 66 of file TensorFiller.h.

67 {
68 auto it = _tensor_filler_vint32.find(tensor_index);
69 if (it != _tensor_filler_vint32.end())
70 {
71 expvalues = it->second;
72 return true;
73 }
74 return false;
75 }

◆ set_tensor_filler() [1/3]

void souschef::TensorFiller::set_tensor_filler ( uint32_t  tensor_index)
inline

This will record the tensor by index, if it needs filler option, such as kernel, bias.

Definition at line 35 of file TensorFiller.h.

35{ _tensor_filler[tensor_index] = true; }

◆ set_tensor_filler() [2/3]

void souschef::TensorFiller::set_tensor_filler ( uint32_t  tensor_index,
std::vector< float > &  expvalues 
)
inline

Definition at line 45 of file TensorFiller.h.

46 {
47 _tensor_filler_vfloat[tensor_index] = expvalues;
48 }

◆ set_tensor_filler() [3/3]

void souschef::TensorFiller::set_tensor_filler ( uint32_t  tensor_index,
std::vector< int32_t > &  expvalues 
)
inline

This will store int32 filler values such as reshape information for the tensor.

Definition at line 40 of file TensorFiller.h.

41 {
42 _tensor_filler_vint32[tensor_index] = expvalues;
43 }

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