pub struct Args {
pub model: PathBuf,
pub verbose: i64,
pub gengraph: bool,
pub graphtype: String,
pub failfast: bool,
}Expand description
Parse and execute inference on pre-trained ONNX models
Fields§
§model: PathBufPath to the folder containing the model to run
If this path is relative, it will be assumed to be relative to $cwd/models, where $cwd is the current working directory
This folder should contain the model’s inputs.json
This file should contain a “modelpath” property which indicates the path to the model’s .onnx file
if this path is relative, it will be relative to the model’s folder
This file should also contain an “inputs” property which is an array of paths to the model’s inputs if these paths are relative, they will be relative to the model’s folder
This file should also contain an “outputs” property which is an array of paths to the model’s expected outputs if these paths are relative, they will be relative to the model’s folder, these outputs will be compared to the outputs of the model
verbose: i64Set verbosity level -1 - No output at all
0 - No output except basic logging
1 - Outputs information about each operator that is executed
2 - Output all results from operators into .npy files
4 - Output intermediate results from operators into .npy files (only supported by conv for now)
gengraph: boolGenerate json/dot file representing the graph of the model
This JSON file is meant to be parsed and printed by the C# program ONNXGraphLayout
The dot file can be converted to an image using the dot program from graphviz
graphtype: StringType of graph to generate, either json or dot, only used if gengraph is true
Default is json
failfast: boolFail immediately if an operator is not implemented yet, otherwise continue and execute the model until panic
Implementations§
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more