Struct ort::session::InMemorySession
source · pub struct InMemorySession<'s> { /* private fields */ }
Expand description
A Session
with data stored in-memory.
Methods from Deref<Target = 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§
Auto Trait Implementations§
impl<'s> RefUnwindSafe for InMemorySession<'s>
impl<'s> Send for InMemorySession<'s>
impl<'s> Sync for InMemorySession<'s>
impl<'s> Unpin for InMemorySession<'s>
impl<'s> UnwindSafe for InMemorySession<'s>
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