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
pub fn allocator(&self) -> *mut OrtAllocator
pub fn bind(&self) -> OrtResult<IoBinding<'_>>
sourcepub fn run<'s, 'm, 'v, 'i>(
&'s self,
input_values: Vec<Value<'v>>
) -> OrtResult<Vec<Value<'static>>>where
's: 'm,
'i: 'v,
pub fn run<'s, 'm, 'v, 'i>( &'s self, input_values: Vec<Value<'v>> ) -> OrtResult<Vec<Value<'static>>>where 's: 'm, 'i: 'v,
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.
pub fn run_with_binding<'s, 'a: 's>( &'a self, binding: &IoBinding<'s> ) -> OrtResult<()>
Trait Implementations§
impl Send for Session
impl Sync for Session
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more