Kaspersky Neuromorphic Platform
1.0.0
API Reference
|
The ModelExecutor class is a definition of an executor that runs the uploaded model on the specified backend. More...
#include <knp/framework/model_executor.h>
Public Member Functions | |
ModelExecutor (knp::framework::Model &model, std::shared_ptr< core::Backend > backend, ModelLoader::InputChannelMap i_map) | |
ModelExecutor constructor. | |
void | start () |
Start model execution. | |
void | start (core::Backend::RunPredicate run_predicate) |
Start model execution. | |
void | stop () |
Stop model execution. | |
template<class Message > | |
void | add_observer (monitoring::MessageProcessor< Message > &&message_processor, const std::vector< core::UID > &senders) |
Add observer to executor. | |
void | start_learning () |
Unlock synapse weights. | |
void | stop_learning () |
Lock synapse weights. | |
std::shared_ptr< core::Backend > | get_backend () |
Get pointer to backend object. | |
auto & | get_loader () |
Get model loader object. | |
The ModelExecutor class is a definition of an executor that runs the uploaded model on the specified backend.
Definition at line 47 of file model_executor.h.
|
inline |
ModelExecutor constructor.
model | model to run. |
backend | pointer to backend on which you want to run the model. |
i_map | input channel map. |
Definition at line 56 of file model_executor.h.
|
inline |
Add observer to executor.
Message | type of messages to observe. |
message_processor | functor to process received messages. |
senders | list of observed entities. |
Definition at line 88 of file model_executor.h.
|
inline |
Get pointer to backend object.
Backend
object. Definition at line 110 of file model_executor.h.
|
inline |
Get model loader object.
ModelLoader
object. Definition at line 116 of file model_executor.h.
void knp::framework::ModelExecutor::start | ( | core::Backend::RunPredicate | run_predicate | ) |
Start model execution.
run_predicate | predicate that stops running if the false value is returned. |
|
inline |
Unlock synapse weights.
Definition at line 99 of file model_executor.h.
|
inline |
Lock synapse weights.
Definition at line 104 of file model_executor.h.