File vart.py#
-
class Runner : public vart::BaseRunner<const void**, void**>
Class of the Runner, provides API to use the runner.
The runner instance has a number of member functions to control the execution and get the input and output tensors of the runner.
Sample code:
// This example assumes that you have a snapshot stored in the model_path. // The way to create a runner to run the snapshot is shown below. // create runner auto runner = vart::Runner::create_runner(model_path, in_shape_format, out_shape_format); // get input tensors auto input_tensors = runner->get_input_tensors(); // get output tensors auto output_tensors = runner->get_output_tensors(); // run runner auto v = runner->execute_async(input, output); auto status = runner->wait((int)v.first, 1000000000); }