ONE - On-device Neural Engine
|
#include <Backend.h>
Public Member Functions | |
Backend (const char *pb_path, const char *info_path) | |
void | setInputOutputFromGraph (const std::unique_ptr< loco::Graph > &loco_graph, ParsedTensors &parsed_tensors) |
void | prepare (const std::function< void(nnkit::TensorContext &)> &f) override |
void | run (void) override |
void | teardown (const std::function< void(nnkit::TensorContext &)> &f) |
Public Member Functions inherited from nnkit::Backend | |
virtual | ~Backend ()=default |
virtual void | prepare (const std::function< void(TensorContext &)> &f)=0 |
virtual void | teardown (const std::function< void(TensorContext &)> &f)=0 |
nnkit::support::moco::tf::Backend::Backend | ( | const char * | pb_path, |
const char * | info_path | ||
) |
Definition at line 87 of file Backend.cpp.
References moco::ModelSignature::add_input(), moco::ModelSignature::add_output(), moco::tf::Frontend::Binary, nnkit::support::tftestinfo::ParsedTensor::Input, nnkit::support::tftestinfo::parse(), setInputOutputFromGraph(), and moco::ModelSignature::shape().
|
override |
Definition at line 122 of file Backend.cpp.
References nncc::core::ADT::tensor::make_buffer(), and locomotiv::make_data().
|
overridevirtual |
Implements nnkit::Backend.
Definition at line 150 of file Backend.cpp.
Referenced by package.infer.session::inference().
void nnkit::support::moco::tf::Backend::setInputOutputFromGraph | ( | const std::unique_ptr< loco::Graph > & | loco_graph, |
ParsedTensors & | parsed_tensors | ||
) |
Definition at line 45 of file Backend.cpp.
References nnkit::support::tftestinfo::ParsedTensor::Input, output_shape, luci_interpreter::RuntimeShape::resize(), and size.
Referenced by Backend().
void nnkit::support::moco::tf::Backend::teardown | ( | const std::function< void(nnkit::TensorContext &)> & | f | ) |
Definition at line 152 of file Backend.cpp.