pub struct Session {
pub inputs: Vec<Input>,
pub outputs: Vec<Output>,
/* private fields */
}
Expand description
Type storing the session information, built from an Environment
Fields§
§inputs: Vec<Input>
Information about the ONNX’s inputs as stored in loaded file
outputs: Vec<Output>
Information about the ONNX’s outputs as stored in loaded file
Implementations§
source§impl Session
impl Session
sourcepub fn run<'s, 'm>(
&'s self,
input_arrays: impl AsRef<[InputTensor]>
) -> OrtResult<Vec<DynOrtTensor<'m, IxDyn>>>where
's: 'm,
pub fn run<'s, 'm>( &'s self, input_arrays: impl AsRef<[InputTensor]> ) -> OrtResult<Vec<DynOrtTensor<'m, IxDyn>>>where 's: 'm,
Run the input data through the ONNX graph, performing inference.
Note that ONNX models can have multiple inputs; a Vec<_>
is thus
used for the input data here.