Loaders
Module: polygraphy.tools.args
- class OnnxrtSessionArgs[source]
Bases:
BaseArgs
ONNX-Runtime Session Creation: creating an ONNX-Runtime Inference Session
Depends on:
OnnxLoadArgs
ModelArgs
- parse_impl(args)[source]
Parses command-line arguments and populates the following attributes:
- providers
A list of execution providers.
- Type:
List[str]
- load_onnxrt_session(model=None)[source]
Loads an ONNX-Runtime Inference Session according to arguments provided on the command-line.
- Parameters:
model (Union[bytes, str]) – The model bytes or path to a model. Defaults to None, in which case, the model specified on the command-line is used.
- Returns:
onnxruntime.InferenceSession