ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mio::circle::Reader Class Reference

Loads Circle file and provides helpers to access attributes. More...

#include <Reader.h>

Public Member Functions

 Reader (const ::circle::Model *model)
 
 Reader ()=delete
 
uint32_t version () const
 
const std::vector< const ::circle::OperatorCode * > & opcodes ()
 
const CircleBuffers_tbuffers ()
 
const CircleTensors_ttensors ()
 
const CircleOperators_toperators ()
 
const std::vector< int32_t > & inputs () const
 
const std::vector< int32_t > & outputs () const
 
const ::circle::DataFormat & data_format () const
 
const CircleMetadata_tmetadata () const
 
const CircleSignatureDef_tsignature_defs () const
 
uint32_t num_subgraph () const
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data)
 
::circle::BuiltinOperator builtin_code (const ::circle::Operator *op) const
 
std::string opcode_name (const ::circle::Operator *op) const
 
std::vector< int32_t > outputs (const ::circle::Operator *op) const
 
std::string tensor_name (const ::circle::Tensor *tensor) const
 
std::string tensor_dtype (const ::circle::Tensor *tensor) const
 
bool select_subgraph (uint32_t subgraph)
 
const std::string & subgraph_name (void) const
 
uint32_t subgraph_index (void) const
 
 Reader (const ::circle::Model *model)
 
 Reader ()=delete
 
uint32_t version () const
 
const std::vector< const ::circle::OperatorCode * > & opcodes ()
 
const CircleBuffers_tbuffers ()
 
const CircleTensors_ttensors ()
 
const CircleOperators_toperators ()
 
const std::vector< int32_t > & inputs () const
 
const std::vector< int32_t > & outputs () const
 
const ::circle::DataFormat & data_format () const
 
const CircleMetadata_tmetadata () const
 
const CircleSignatureDef_tsignature_defs () const
 
uint32_t num_subgraph () const
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data)
 
::circle::BuiltinOperator builtin_code (const ::circle::Operator *op) const
 
std::string opcode_name (const ::circle::Operator *op) const
 
std::vector< int32_t > outputs (const ::circle::Operator *op) const
 
std::string tensor_name (const ::circle::Tensor *tensor) const
 
std::string tensor_dtype (const ::circle::Tensor *tensor) const
 
bool select_subgraph (uint32_t subgraph)
 
const std::string & subgraph_name (void) const
 
uint32_t subgraph_index (void) const
 
 Reader (const ::circle::Model *model)
 
 Reader ()=delete
 
uint32_t version () const
 
const std::vector< const ::circle::OperatorCode * > & opcodes ()
 
const CircleBuffers_tbuffers ()
 
const CircleTensors_ttensors ()
 
const CircleOperators_toperators ()
 
const std::vector< int32_t > & inputs () const
 
const std::vector< int32_t > & outputs () const
 
const ::circle::DataFormat & data_format () const
 
const CircleMetadata_tmetadata () const
 
const CircleSignatureDef_tsignature_defs () const
 
uint32_t num_subgraph () const
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data)
 
::circle::BuiltinOperator builtin_code (const ::circle::Operator *op) const
 
std::string opcode_name (const ::circle::Operator *op) const
 
std::vector< int32_t > outputs (const ::circle::Operator *op) const
 
std::string tensor_name (const ::circle::Tensor *tensor) const
 
std::string tensor_dtype (const ::circle::Tensor *tensor) const
 
bool select_subgraph (uint32_t subgraph)
 
const std::string & subgraph_name (void) const
 
uint32_t subgraph_index (void) const
 
 Reader (const ::circle::Model *model)
 
 Reader ()=delete
 
uint32_t version () const
 
const std::vector< const ::circle::OperatorCode * > & opcodes ()
 
const CircleBuffers_tbuffers ()
 
const CircleTensors_ttensors ()
 
const CircleOperators_toperators ()
 
const std::vector< int32_t > & inputs () const
 
const std::vector< int32_t > & outputs () const
 
const CircleMetadata_tmetadata () const
 
const CircleSignatureDef_tsignature_defs () const
 
uint32_t num_subgraph () const
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data)
 
::circle::BuiltinOperator builtin_code (const ::circle::Operator *op) const
 
std::string opcode_name (const ::circle::Operator *op) const
 
std::vector< int32_t > outputs (const ::circle::Operator *op) const
 
std::string tensor_name (const ::circle::Tensor *tensor) const
 
std::string tensor_dtype (const ::circle::Tensor *tensor) const
 
bool select_subgraph (uint32_t subgraph)
 
const std::string & subgraph_name (void) const
 
uint32_t subgraph_index (void) const
 
 Reader (const ::circle::Model *model)
 
 Reader (const ::circle::Model *model, const std::vector< char > *rawdata)
 
 Reader ()=delete
 
uint32_t version () const
 
const std::vector< const ::circle::OperatorCode * > & opcodes ()
 
const CircleBuffers_tbuffers ()
 
const CircleTensors_ttensors ()
 
const CircleOperators_toperators ()
 
const std::vector< int32_t > & inputs () const
 
const std::vector< int32_t > & outputs () const
 
const CircleMetadata_tmetadata () const
 
const CircleSignatureDef_tsignature_defs () const
 
uint32_t num_subgraph () const
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data)
 
size_t buffer_info (uint32_t buf_idx, const uint8_t **buff_data, bool &ext_offset)
 
::circle::BuiltinOperator builtin_code (const ::circle::Operator *op) const
 
std::string opcode_name (const ::circle::Operator *op) const
 
std::vector< int32_t > outputs (const ::circle::Operator *op) const
 
std::string tensor_name (const ::circle::Tensor *tensor) const
 
std::string tensor_dtype (const ::circle::Tensor *tensor) const
 
bool select_subgraph (uint32_t subgraph)
 
const std::string & subgraph_name (void) const
 
uint32_t subgraph_index (void) const
 

Detailed Description

Loads Circle file and provides helpers to access attributes.

Definition at line 38 of file Reader.h.

Constructor & Destructor Documentation

◆ Reader() [1/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model)

Definition at line 28 of file Reader.cpp.

29{
30 if (model == nullptr)
31 {
32 throw std::runtime_error("Invalid model");
33 }
34
35 _version = model->version();
36 _subgraphs = model->subgraphs();
37 _buffers = model->buffers();
38 _metadata = model->metadata();
39 _signature_defs = model->signature_defs();
40
41 auto opcodes = model->operator_codes();
42 for (const ::circle::OperatorCode *opcode : *opcodes)
43 {
44 _op_codes.push_back(opcode);
45 }
46}
const std::vector< const ::circle::OperatorCode * > & opcodes()
Definition Reader.h:56

References opcodes().

◆ Reader() [2/11]

mio::circle::Reader::Reader ( )
delete

◆ Reader() [3/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model)

◆ Reader() [4/11]

mio::circle::Reader::Reader ( )
delete

◆ Reader() [5/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model)

◆ Reader() [6/11]

mio::circle::Reader::Reader ( )
delete

◆ Reader() [7/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model)

◆ Reader() [8/11]

mio::circle::Reader::Reader ( )
delete

◆ Reader() [9/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model)

◆ Reader() [10/11]

mio::circle::Reader::Reader ( const ::circle::Model *  model,
const std::vector< char > *  rawdata 
)

Definition at line 49 of file Reader.cpp.

50{
51 if (model == nullptr)
52 {
53 throw std::runtime_error("Invalid model");
54 }
55
56 _rawdata = rawdata;
57
58 _version = model->version();
59 _subgraphs = model->subgraphs();
60 _buffers = model->buffers();
61 _metadata = model->metadata();
62 _signature_defs = model->signature_defs();
63
64 auto opcodes = model->operator_codes();
65 for (const ::circle::OperatorCode *opcode : *opcodes)
66 {
67 _op_codes.push_back(opcode);
68 }
69}

References opcodes().

◆ Reader() [11/11]

mio::circle::Reader::Reader ( )
delete

Member Function Documentation

◆ buffer_info() [1/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data 
)

Definition at line 48 of file Reader.cpp.

49{
50 if (buff_data != nullptr)
51 {
52 *buff_data = nullptr;
53 }
54
55 if (buf_idx == 0)
56 return 0;
57
58 if (auto *buffer = (*_buffers)[buf_idx])
59 {
60 if (auto *array = buffer->data())
61 {
62 if (size_t size = array->size())
63 {
64 if (buff_data != nullptr)
65 {
66 *buff_data = reinterpret_cast<const uint8_t *>(array->data());
67 }
68 return size;
69 }
70 }
71 }
72
73 return 0;
74}
int32_t size[5]
Definition Slice.cpp:35

References size.

Referenced by circledump::dump_model(), and circleinspect::DumpConstants::run().

◆ buffer_info() [2/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data 
)

◆ buffer_info() [3/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data 
)

◆ buffer_info() [4/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data 
)

◆ buffer_info() [5/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data 
)

◆ buffer_info() [6/6]

size_t mio::circle::Reader::buffer_info ( uint32_t  buf_idx,
const uint8_t **  buff_data,
bool &  ext_offset 
)

Definition at line 101 of file Reader.cpp.

102{
103 ext_offset = false;
104
105 if (buff_data != nullptr)
106 {
107 *buff_data = nullptr;
108 }
109
110 if (buf_idx == 0)
111 return 0;
112
113 if (auto *buffer = (*_buffers)[buf_idx])
114 {
115 auto buffer_offset = buffer->offset();
116 if (buffer_offset > 1)
117 {
118 assert(_rawdata); // make debug break for invalid case
119 if (_rawdata == nullptr)
120 return 0;
121
122 ext_offset = true;
123 if (buff_data != nullptr)
124 {
125 *buff_data = reinterpret_cast<const uint8_t *>(&_rawdata->at(buffer_offset));
126 }
127 return buffer->size();
128 }
129 else if (auto *array = buffer->data())
130 {
131 if (size_t size = array->size())
132 {
133 if (buff_data != nullptr)
134 {
135 *buff_data = reinterpret_cast<const uint8_t *>(array->data());
136 }
137 return size;
138 }
139 }
140 else
141 {
142 if (buffer->offset() == 1 && buffer->size() == 1)
143 {
144 std::cerr << "Buffer " << buf_idx << " has invalid offset/size." << std::endl;
145 }
146 }
147 }
148
149 return 0;
150}

References size.

◆ buffers() [1/5]

const CircleBuffers_t * mio::circle::Reader::buffers ( )
inline

Definition at line 57 of file Reader.h.

57{ return _buffers; }

Referenced by circledump::dump_model(), circletensordump::DumpTensors::run(), and circletensordump::DumpTensorsToHdf5::run().

◆ buffers() [2/5]

const CircleBuffers_t * mio::circle::Reader::buffers ( )
inline

Definition at line 57 of file Reader.h.

57{ return _buffers; }

◆ buffers() [3/5]

const CircleBuffers_t * mio::circle::Reader::buffers ( )
inline

Definition at line 57 of file Reader.h.

57{ return _buffers; }

◆ buffers() [4/5]

const CircleBuffers_t * mio::circle::Reader::buffers ( )
inline

Definition at line 57 of file Reader.h.

57{ return _buffers; }

◆ buffers() [5/5]

const CircleBuffers_t * mio::circle::Reader::buffers ( )
inline

Definition at line 58 of file Reader.h.

58{ return _buffers; }

◆ builtin_code() [1/5]

circle::BuiltinOperator mio::circle::Reader::builtin_code ( const ::circle::Operator *  op) const

Definition at line 76 of file Reader.cpp.

77{
78 uint32_t index = op->opcode_index();
79 assert(index < _op_codes.size());
80 const ::circle::OperatorCode *opcode = _op_codes.at(index);
81
83}
::circle::BuiltinOperator builtin_code_neutral(const ::circle::OperatorCode *opcode)
Definition Helper.cpp:33
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

References mio::circle::builtin_code_neutral().

Referenced by circledump::dump_sub_graph(), and circleinspect::DumpConv2DWeight::run().

◆ builtin_code() [2/5]

::circle::BuiltinOperator mio::circle::Reader::builtin_code ( const ::circle::Operator *  op) const

◆ builtin_code() [3/5]

::circle::BuiltinOperator mio::circle::Reader::builtin_code ( const ::circle::Operator *  op) const

◆ builtin_code() [4/5]

::circle::BuiltinOperator mio::circle::Reader::builtin_code ( const ::circle::Operator *  op) const

◆ builtin_code() [5/5]

::circle::BuiltinOperator mio::circle::Reader::builtin_code ( const ::circle::Operator *  op) const

◆ data_format() [1/3]

const ::circle::DataFormat & mio::circle::Reader::data_format ( ) const
inline

Definition at line 62 of file Reader.h.

62{ return _data_format; }

◆ data_format() [2/3]

const ::circle::DataFormat & mio::circle::Reader::data_format ( ) const
inline

Definition at line 62 of file Reader.h.

62{ return _data_format; }

◆ data_format() [3/3]

const ::circle::DataFormat & mio::circle::Reader::data_format ( ) const
inline

Definition at line 62 of file Reader.h.

62{ return _data_format; }

◆ inputs() [1/5]

const std::vector< int32_t > & mio::circle::Reader::inputs ( ) const
inline

◆ inputs() [2/5]

const std::vector< int32_t > & mio::circle::Reader::inputs ( ) const
inline

Definition at line 60 of file Reader.h.

60{ return _inputs; }

Referenced by validate_onnx2circle.OnnxRunner::feed_random_inputs(), and package.infer.session::set_inputs().

◆ inputs() [3/5]

const std::vector< int32_t > & mio::circle::Reader::inputs ( ) const
inline

Definition at line 60 of file Reader.h.

60{ return _inputs; }

Referenced by validate_onnx2circle.OnnxRunner::feed_random_inputs(), and package.infer.session::set_inputs().

◆ inputs() [4/5]

const std::vector< int32_t > & mio::circle::Reader::inputs ( ) const
inline

Definition at line 60 of file Reader.h.

60{ return _inputs; }

Referenced by validate_onnx2circle.OnnxRunner::feed_random_inputs(), and package.infer.session::set_inputs().

◆ inputs() [5/5]

const std::vector< int32_t > & mio::circle::Reader::inputs ( ) const
inline

Definition at line 61 of file Reader.h.

61{ return _inputs; }

Referenced by validate_onnx2circle.OnnxRunner::feed_random_inputs(), and package.infer.session::set_inputs().

◆ metadata() [1/5]

const CircleMetadata_t * mio::circle::Reader::metadata ( ) const
inline

Definition at line 63 of file Reader.h.

63{ return _metadata; }

Referenced by circledump::dump_model().

◆ metadata() [2/5]

const CircleMetadata_t * mio::circle::Reader::metadata ( ) const
inline

Definition at line 63 of file Reader.h.

63{ return _metadata; }

◆ metadata() [3/5]

const CircleMetadata_t * mio::circle::Reader::metadata ( ) const
inline

Definition at line 63 of file Reader.h.

63{ return _metadata; }

◆ metadata() [4/5]

const CircleMetadata_t * mio::circle::Reader::metadata ( ) const
inline

Definition at line 62 of file Reader.h.

62{ return _metadata; }

◆ metadata() [5/5]

const CircleMetadata_t * mio::circle::Reader::metadata ( ) const
inline

Definition at line 63 of file Reader.h.

63{ return _metadata; }

◆ num_subgraph() [1/5]

◆ num_subgraph() [2/5]

uint32_t mio::circle::Reader::num_subgraph ( ) const
inline

Definition at line 66 of file Reader.h.

66{ return _subgraphs->Length(); }

◆ num_subgraph() [3/5]

uint32_t mio::circle::Reader::num_subgraph ( ) const
inline

Definition at line 66 of file Reader.h.

66{ return _subgraphs->Length(); }

◆ num_subgraph() [4/5]

uint32_t mio::circle::Reader::num_subgraph ( ) const
inline

Definition at line 65 of file Reader.h.

65{ return _subgraphs->size(); }
uoffset_t size() const

References flatbuffers::Vector< T >::size().

◆ num_subgraph() [5/5]

uint32_t mio::circle::Reader::num_subgraph ( ) const
inline

Definition at line 66 of file Reader.h.

66{ return _subgraphs->size(); }

References flatbuffers::Vector< T >::size().

◆ opcode_name() [1/5]

std::string mio::circle::Reader::opcode_name ( const ::circle::Operator *  op) const

Definition at line 85 of file Reader.cpp.

86{
87 uint32_t index = op->opcode_index();
88 assert(index < _op_codes.size());
89 const ::circle::OperatorCode *opcode = _op_codes.at(index);
90
91 if (!mio::circle::is_valid(opcode))
92 {
93 std::ostringstream oss;
94 oss << "(invalid: " << index << ")";
95 return oss.str();
96 }
97
98 return mio::circle::opcode_name(opcode);
99}
std::string opcode_name(const ::circle::OperatorCode *opcode)
Definition Helper.cpp:38
bool is_valid(const ::circle::OperatorCode *opcode)
Definition Helper.cpp:26

References mio::circle::is_valid(), and mio::circle::opcode_name().

Referenced by circledump::dump_sub_graph(), circleinspect::DumpOperators::run(), circleinspect::DumpConv2DWeight::run(), and circleinspect::DumpOperatorVersion::run().

◆ opcode_name() [2/5]

std::string mio::circle::Reader::opcode_name ( const ::circle::Operator *  op) const

◆ opcode_name() [3/5]

std::string mio::circle::Reader::opcode_name ( const ::circle::Operator *  op) const

◆ opcode_name() [4/5]

std::string mio::circle::Reader::opcode_name ( const ::circle::Operator *  op) const

◆ opcode_name() [5/5]

std::string mio::circle::Reader::opcode_name ( const ::circle::Operator *  op) const

◆ opcodes() [1/5]

const std::vector< const ::circle::OperatorCode * > & mio::circle::Reader::opcodes ( )
inline

Definition at line 56 of file Reader.h.

56{ return _op_codes; }

Referenced by circledump::dump_model(), Reader(), Reader(), and circleinspect::DumpOperatorVersion::run().

◆ opcodes() [2/5]

const std::vector< const ::circle::OperatorCode * > & mio::circle::Reader::opcodes ( )
inline

Definition at line 56 of file Reader.h.

56{ return _op_codes; }

◆ opcodes() [3/5]

const std::vector< const ::circle::OperatorCode * > & mio::circle::Reader::opcodes ( )
inline

Definition at line 56 of file Reader.h.

56{ return _op_codes; }

◆ opcodes() [4/5]

const std::vector< const ::circle::OperatorCode * > & mio::circle::Reader::opcodes ( )
inline

Definition at line 56 of file Reader.h.

56{ return _op_codes; }

◆ opcodes() [5/5]

const std::vector< const ::circle::OperatorCode * > & mio::circle::Reader::opcodes ( )
inline

Definition at line 57 of file Reader.h.

57{ return _op_codes; }

◆ operators() [1/5]

const CircleOperators_t * mio::circle::Reader::operators ( )
inline

◆ operators() [2/5]

const CircleOperators_t * mio::circle::Reader::operators ( )
inline

Definition at line 59 of file Reader.h.

59{ return _operators; }

◆ operators() [3/5]

const CircleOperators_t * mio::circle::Reader::operators ( )
inline

Definition at line 59 of file Reader.h.

59{ return _operators; }

◆ operators() [4/5]

const CircleOperators_t * mio::circle::Reader::operators ( )
inline

Definition at line 59 of file Reader.h.

59{ return _operators; }

◆ operators() [5/5]

const CircleOperators_t * mio::circle::Reader::operators ( )
inline

Definition at line 60 of file Reader.h.

60{ return _operators; }

◆ outputs() [1/10]

const std::vector< int32_t > & mio::circle::Reader::outputs ( ) const
inline

◆ outputs() [2/10]

const std::vector< int32_t > & mio::circle::Reader::outputs ( ) const
inline

◆ outputs() [3/10]

const std::vector< int32_t > & mio::circle::Reader::outputs ( ) const
inline

◆ outputs() [4/10]

const std::vector< int32_t > & mio::circle::Reader::outputs ( ) const
inline

◆ outputs() [5/10]

const std::vector< int32_t > & mio::circle::Reader::outputs ( ) const
inline

◆ outputs() [6/10]

std::vector< int32_t > mio::circle::Reader::outputs ( const ::circle::Operator *  op) const

Definition at line 101 of file Reader.cpp.

102{
103 return as_index_vector(op->outputs());
104}
std::vector< T > as_index_vector(const flatbuffers::Vector< T > *flat_array)
Definition Helper.h:36

References mio::circle::as_index_vector().

Referenced by validate_onnx2circle.OnnxRunner::get_outputs(), package.infer.session::inference(), and package.infer.session::set_outputs().

◆ outputs() [7/10]

std::vector< int32_t > mio::circle::Reader::outputs ( const ::circle::Operator *  op) const

◆ outputs() [8/10]

std::vector< int32_t > mio::circle::Reader::outputs ( const ::circle::Operator *  op) const

◆ outputs() [9/10]

std::vector< int32_t > mio::circle::Reader::outputs ( const ::circle::Operator *  op) const

◆ outputs() [10/10]

std::vector< int32_t > mio::circle::Reader::outputs ( const ::circle::Operator *  op) const

◆ select_subgraph() [1/5]

bool mio::circle::Reader::select_subgraph ( uint32_t  subgraph)

Definition at line 116 of file Reader.cpp.

117{
118 _subgraph_index = sgindex;
119 _tensors = nullptr;
120 _operators = nullptr;
121
122 _inputs.clear();
123 _outputs.clear();
124
125 if (_subgraphs->Length() <= sgindex)
126 {
127 assert(false);
128 return false;
129 }
130
131 const ::circle::SubGraph *subgraph = (*_subgraphs)[sgindex];
132
133 auto name = subgraph->name();
134 _subgraph_name = name ? name->c_str() : "(noname)";
135
136 _tensors = subgraph->tensors();
137 _operators = subgraph->operators();
138 _data_format = subgraph->data_format();
139
140 _inputs = as_index_vector(subgraph->inputs());
141 _outputs = as_index_vector(subgraph->outputs());
142
143 return true;
144}

References mio::circle::as_index_vector().

Referenced by circledump::dump_model(), cirops::DumpOperators::run(), circletensordump::DumpTensors::run(), circletensordump::DumpTensorsToHdf5::run(), circleinspect::DumpOperators::run(), circleinspect::DumpConv2DWeight::run(), circleinspect::DumpOperatorVersion::run(), circleinspect::DumpTensorDType::run(), circleinspect::DumpConstants::run(), and circleinspect::DumpTensorShape::run().

◆ select_subgraph() [2/5]

bool mio::circle::Reader::select_subgraph ( uint32_t  subgraph)

◆ select_subgraph() [3/5]

bool mio::circle::Reader::select_subgraph ( uint32_t  subgraph)

◆ select_subgraph() [4/5]

bool mio::circle::Reader::select_subgraph ( uint32_t  subgraph)

◆ select_subgraph() [5/5]

bool mio::circle::Reader::select_subgraph ( uint32_t  subgraph)

◆ signature_defs() [1/5]

const CircleSignatureDef_t * mio::circle::Reader::signature_defs ( ) const
inline

Definition at line 64 of file Reader.h.

64{ return _signature_defs; }

Referenced by circledump::dump_model().

◆ signature_defs() [2/5]

const CircleSignatureDef_t * mio::circle::Reader::signature_defs ( ) const
inline

Definition at line 64 of file Reader.h.

64{ return _signature_defs; }

◆ signature_defs() [3/5]

const CircleSignatureDef_t * mio::circle::Reader::signature_defs ( ) const
inline

Definition at line 64 of file Reader.h.

64{ return _signature_defs; }

◆ signature_defs() [4/5]

const CircleSignatureDef_t * mio::circle::Reader::signature_defs ( ) const
inline

Definition at line 63 of file Reader.h.

63{ return _signature_defs; }

◆ signature_defs() [5/5]

const CircleSignatureDef_t * mio::circle::Reader::signature_defs ( ) const
inline

Definition at line 64 of file Reader.h.

64{ return _signature_defs; }

◆ subgraph_index() [1/5]

uint32_t mio::circle::Reader::subgraph_index ( void  ) const
inline

Definition at line 78 of file Reader.h.

78{ return _subgraph_index; }

Referenced by circledump::dump_sub_graph().

◆ subgraph_index() [2/5]

uint32_t mio::circle::Reader::subgraph_index ( void  ) const
inline

Definition at line 78 of file Reader.h.

78{ return _subgraph_index; }

◆ subgraph_index() [3/5]

uint32_t mio::circle::Reader::subgraph_index ( void  ) const
inline

Definition at line 78 of file Reader.h.

78{ return _subgraph_index; }

◆ subgraph_index() [4/5]

uint32_t mio::circle::Reader::subgraph_index ( void  ) const
inline

Definition at line 77 of file Reader.h.

77{ return _subgraph_index; }

◆ subgraph_index() [5/5]

uint32_t mio::circle::Reader::subgraph_index ( void  ) const
inline

Definition at line 79 of file Reader.h.

79{ return _subgraph_index; }

◆ subgraph_name() [1/5]

const std::string & mio::circle::Reader::subgraph_name ( void  ) const
inline

Definition at line 77 of file Reader.h.

77{ return _subgraph_name; }

Referenced by circledump::dump_model().

◆ subgraph_name() [2/5]

const std::string & mio::circle::Reader::subgraph_name ( void  ) const
inline

Definition at line 77 of file Reader.h.

77{ return _subgraph_name; }

◆ subgraph_name() [3/5]

const std::string & mio::circle::Reader::subgraph_name ( void  ) const
inline

Definition at line 77 of file Reader.h.

77{ return _subgraph_name; }

◆ subgraph_name() [4/5]

const std::string & mio::circle::Reader::subgraph_name ( void  ) const
inline

Definition at line 76 of file Reader.h.

76{ return _subgraph_name; }

◆ subgraph_name() [5/5]

const std::string & mio::circle::Reader::subgraph_name ( void  ) const
inline

Definition at line 78 of file Reader.h.

78{ return _subgraph_name; }

◆ tensor_dtype() [1/5]

std::string mio::circle::Reader::tensor_dtype ( const ::circle::Tensor *  tensor) const

Definition at line 111 of file Reader.cpp.

112{
113 return mio::circle::tensor_type(tensor);
114}
const char * tensor_type(const ::circle::Tensor *tensor)
Definition Helper.cpp:64

References mio::circle::tensor_type().

Referenced by circleinspect::DumpTensorDType::run().

◆ tensor_dtype() [2/5]

std::string mio::circle::Reader::tensor_dtype ( const ::circle::Tensor *  tensor) const

◆ tensor_dtype() [3/5]

std::string mio::circle::Reader::tensor_dtype ( const ::circle::Tensor *  tensor) const

◆ tensor_dtype() [4/5]

std::string mio::circle::Reader::tensor_dtype ( const ::circle::Tensor *  tensor) const

◆ tensor_dtype() [5/5]

std::string mio::circle::Reader::tensor_dtype ( const ::circle::Tensor *  tensor) const

◆ tensor_name() [1/5]

std::string mio::circle::Reader::tensor_name ( const ::circle::Tensor *  tensor) const

Definition at line 106 of file Reader.cpp.

107{
108 return mio::circle::tensor_name(tensor);
109}
const char * tensor_name(const ::circle::Tensor *tensor)
Definition Helper.cpp:69

References mio::circle::tensor_name().

Referenced by circleinspect::DumpTensorDType::run(), circleinspect::DumpConstants::run(), and circleinspect::DumpTensorShape::run().

◆ tensor_name() [2/5]

std::string mio::circle::Reader::tensor_name ( const ::circle::Tensor *  tensor) const

◆ tensor_name() [3/5]

std::string mio::circle::Reader::tensor_name ( const ::circle::Tensor *  tensor) const

◆ tensor_name() [4/5]

std::string mio::circle::Reader::tensor_name ( const ::circle::Tensor *  tensor) const

◆ tensor_name() [5/5]

std::string mio::circle::Reader::tensor_name ( const ::circle::Tensor *  tensor) const

◆ tensors() [1/5]

◆ tensors() [2/5]

const CircleTensors_t * mio::circle::Reader::tensors ( )
inline

Definition at line 58 of file Reader.h.

58{ return _tensors; }

◆ tensors() [3/5]

const CircleTensors_t * mio::circle::Reader::tensors ( )
inline

Definition at line 58 of file Reader.h.

58{ return _tensors; }

◆ tensors() [4/5]

const CircleTensors_t * mio::circle::Reader::tensors ( )
inline

Definition at line 58 of file Reader.h.

58{ return _tensors; }

◆ tensors() [5/5]

const CircleTensors_t * mio::circle::Reader::tensors ( )
inline

Definition at line 59 of file Reader.h.

59{ return _tensors; }

◆ version() [1/5]

uint32_t mio::circle::Reader::version ( ) const
inline

Definition at line 54 of file Reader.h.

54{ return _version; }

Referenced by circledump::dump_model().

◆ version() [2/5]

uint32_t mio::circle::Reader::version ( ) const
inline

Definition at line 54 of file Reader.h.

54{ return _version; }

◆ version() [3/5]

uint32_t mio::circle::Reader::version ( ) const
inline

Definition at line 54 of file Reader.h.

54{ return _version; }

◆ version() [4/5]

uint32_t mio::circle::Reader::version ( ) const
inline

Definition at line 54 of file Reader.h.

54{ return _version; }

◆ version() [5/5]

uint32_t mio::circle::Reader::version ( ) const
inline

Definition at line 55 of file Reader.h.

55{ return _version; }

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