mindspore_lite.ModelExecutor

View Source On Gitee
class mindspore_lite.ModelExecutor(executor=None)[source]

The ModelExecutor class wraps multiple mindspore_lite models and implements their inference scheduling.

get_inputs()[source]

Obtains all input Tensors of the ModelExecutor.

Returns

list[Tensor], the input Tensor list of the ModelExecutor.

get_outputs()[source]

" Obtains all output information Tensors of the ModelExecutor.

Returns

list[TensorMeta], the output TensorMeta list of the ModelExecutor.

predict(inputs, outputs=None)[source]

Inference ModelExecutor.

Parameters
  • inputs (list[Tensor]) – A list that includes all input Tensors in order.

  • outputs (list[Tensor], optional) – A list that includes all output Tensors in order, this tensor include output data buffer.

Returns

list[Tensor], the output Tensor list of the ModelExecutor.