Model
Module: polygraphy.tools.args
- class ModelArgs(model_opt_required: Optional[bool] = None, required_model_type: Optional[str] = None, input_shapes_opt_name: Optional[str] = None, input_shapes_opt_doc: Optional[str] = None, guess_model_type_from_runners: Optional[bool] = None)[source]
Bases:
polygraphy.tools.args.base.BaseArgs
Model: the model
Depends on:
RunnerSelectArgs: if guess_model_type_from_runners == True
- Parameters
model_opt_required (bool) – Whether the model argument is required. Defaults to False.
required_model_type (str) – The required type of model. Use a value of
None
for tools that work with multiple model types. If provided, it causes the tool to support only one type of model and disables the--model-type
option. Defaults to None.input_shapes_opt_name (str) – The name of the option used to specify input shapes. A second option name will be automatically added by dropping the final
s
in the specified option and suffixing-shapes
. For example, a value of “inputs” would generate an alias called “–input-shapes”. Defaults to “inputs”. Use a value ofFalse
to disable the option.input_shapes_opt_doc (str) – Custom help text output for the input shapes option.
guess_model_type_from_runners (bool) – Whether to guess the model type based on which runners have been specified, if any. Defaults to False.