Struct onnxruntime::session::Session [−][src]
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
pub fn run<'s, 't, 'm, TIn, TOut, D>(
&'s mut self,
input_arrays: Vec<Array<TIn, D>>
) -> Result<Vec<OrtOwnedTensor<'t, 'm, TOut, IxDyn>>> where
TIn: TypeToTensorElementDataType + Debug + Clone,
TOut: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
's: 'm,
pub fn run<'s, 't, 'm, TIn, TOut, D>(
&'s mut self,
input_arrays: Vec<Array<TIn, D>>
) -> Result<Vec<OrtOwnedTensor<'t, 'm, TOut, IxDyn>>> where
TIn: TypeToTensorElementDataType + Debug + Clone,
TOut: TypeToTensorElementDataType + Debug + Clone,
D: Dimension,
'm: 't,
'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.