Menoh
Public Member Functions | List of all members
menoh::model_data Class Reference

model data class More...

#include <menoh.hpp>

Public Member Functions

 model_data ()
 
 model_data (menoh_model_data_handle h)
 
menoh_model_data_handle get () const noexcept
 
void reset () noexcept
 Release internal alocated memory. More...
 
void optimize (variable_profile_table const &vpt)
 Optimize model_data. More...
 
void add_new_node (std::string const &op_type)
 
void add_input_name_to_current_node (std::string const &input_name)
 
void add_output_name_to_current_node (std::string const &output_name)
 
void add_attribute_int_to_current_node (std::string const &attribute_name, int32_t value)
 
void add_attribute_ints_to_current_node (std::string const &attribute_name, std::vector< int32_t > const &value)
 
void add_attribute_float_to_current_node (std::string const &attribute_name, float value)
 
void add_attribute_floats_to_current_node (std::string const &attribute_name, std::vector< float > const &value)
 
void add_parameter (std::string const &parameter_name, dtype_t dtype, std::vector< int > const &dims, void *buffer_handle)
 

Detailed Description

model data class

Constructor & Destructor Documentation

◆ model_data() [1/2]

menoh::model_data::model_data ( )
inline

◆ model_data() [2/2]

menoh::model_data::model_data ( menoh_model_data_handle  h)
inline
Note
Normally users needn't call this constructer. Use make_model_data_from_onnx() instead.

Member Function Documentation

◆ add_attribute_float_to_current_node()

void menoh::model_data::add_attribute_float_to_current_node ( std::string const &  attribute_name,
float  value 
)
inline

◆ add_attribute_floats_to_current_node()

void menoh::model_data::add_attribute_floats_to_current_node ( std::string const &  attribute_name,
std::vector< float > const &  value 
)
inline

◆ add_attribute_int_to_current_node()

void menoh::model_data::add_attribute_int_to_current_node ( std::string const &  attribute_name,
int32_t  value 
)
inline

◆ add_attribute_ints_to_current_node()

void menoh::model_data::add_attribute_ints_to_current_node ( std::string const &  attribute_name,
std::vector< int32_t > const &  value 
)
inline

◆ add_input_name_to_current_node()

void menoh::model_data::add_input_name_to_current_node ( std::string const &  input_name)
inline

◆ add_new_node()

void menoh::model_data::add_new_node ( std::string const &  op_type)
inline

◆ add_output_name_to_current_node()

void menoh::model_data::add_output_name_to_current_node ( std::string const &  output_name)
inline

◆ add_parameter()

void menoh::model_data::add_parameter ( std::string const &  parameter_name,
dtype_t  dtype,
std::vector< int > const &  dims,
void *  buffer_handle 
)
inline

◆ get()

menoh_model_data_handle menoh::model_data::get ( ) const
inlinenoexcept

Accessor to internal handle

Note
Normally users needn't call this function.

◆ reset()

void menoh::model_data::reset ( )
inlinenoexcept

Release internal alocated memory.

Users can (and should) call this function after model_builder::build_model() function call.

Do not reuse model_data being reset by this function.

See also
model_builder::build_model()

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