ONE - On-device Neural Engine
|
#include <CircleModel.h>
Public Member Functions | |
CircleModel (const std::vector< uint8_t > &buffer) | |
Initialize the model with buffer representation. | |
CircleModel (const std::string &model_path) | |
Initialize the model with buffer representation. | |
~CircleModel () | |
Dtor of CircleModel. Note that explicit declaration is needed to satisfy forward declaration + unique_ptr. | |
luci::Module * | module () |
Get the loaded model in luci::Module representation. | |
std::vector< Shape > | input_shapes () const |
Get input shapes of the loaded model. | |
std::vector< Shape > | output_shapes () const |
Get output shapes of the loaded model. | |
void | save (std::ostream &stream) |
Save the model to the output stream. | |
void | save (const std::string &output_path) |
Save the model to the location indicated by output_path. | |
The representation of Circle Model.
Definition at line 37 of file CircleModel.h.
|
explicit |
Initialize the model with buffer representation.
Exceptions:
Definition at line 117 of file CircleModel.cpp.
|
explicit |
Initialize the model with buffer representation.
Exceptions:
Definition at line 119 of file CircleModel.cpp.
|
default |
Dtor of CircleModel. Note that explicit declaration is needed to satisfy forward declaration + unique_ptr.
std::vector< Shape > CircleModel::input_shapes | ( | ) | const |
Get input shapes of the loaded model.
Definition at line 146 of file CircleModel.cpp.
References loco::input_nodes().
luci::Module * CircleModel::module | ( | ) |
Get the loaded model in luci::Module representation.
Definition at line 121 of file CircleModel.cpp.
Referenced by save().
std::vector< Shape > CircleModel::output_shapes | ( | ) | const |
Get output shapes of the loaded model.
Definition at line 151 of file CircleModel.cpp.
References loco::output_nodes().
void CircleModel::save | ( | const std::string & | output_path | ) |
Save the model to the location indicated by output_path.
Exceptions:
Definition at line 140 of file CircleModel.cpp.
References save().
void CircleModel::save | ( | std::ostream & | stream | ) |
Save the model to the output stream.
Exceptions:
Definition at line 123 of file CircleModel.cpp.
References luci::CircleExporter::invoke(), and module().
Referenced by save().