Class ModelExecutor
Defined in File multi_model_runner.h
Class Documentation
-
class ModelExecutor
Public Functions
-
ModelExecutor() = default
Constructor of ModelExecutor.
Constructor of ModelExecutor.
- 参数
models – [in] Which is a vector of ModelImplPtr, used to inference in ModelExecutor.
executor_input_names – [in] Which is a vector of string, name of ModelExecutor's inputs.
executor_output_names – [in] Which is a vector of string, name of ModelExecutor's outputs.
subgraph_input_names – [in] Which is a vector of vector of string, name of every model's inputs in ModelExecutor.
-
~ModelExecutor() = default
Destructor of ModelExecutor.
-
Status Predict(const std::vector<MSTensor> &inputs, std::vector<MSTensor> *outputs)
Inference ModelExecutor API.
- 参数
inputs – [in] A vector where ModelExecutor inputs are arranged in sequence.
outputs – [out] Which is a pointer to a vector. The ModelExecutor outputs are filled in the container in sequence.
- 返回
Status.
-
std::vector<MSTensor> GetInputs() const
Obtains all input tensors of the ModelExecutor.
- 返回
The vector that includes all input tensors.
-
std::vector<MSTensor> GetOutputs() const
Obtains all output tensors of the ModelExecutor.
- 返回
The vector that includes all output tensors.
Inference ModelExecutor API. If use this API in train mode, it's equal to RunStep API.
- 参数
model_context – [in] Define the context used to store options during execution.
- 返回
Status.
-
ModelExecutor() = default