pub struct SessionOptions { /* private fields */ }Expand description
Options for configuring an inference session
Implementations§
Source§impl SessionOptions
impl SessionOptions
Sourcepub fn with_optimization_level(self, level: OptimizationLevel) -> Self
pub fn with_optimization_level(self, level: OptimizationLevel) -> Self
Set optimization level
Sourcepub fn with_provider(self, provider: ProviderType) -> Self
pub fn with_provider(self, provider: ProviderType) -> Self
Set execution provider
Sourcepub fn with_num_threads(self, num_threads: usize) -> Self
pub fn with_num_threads(self, num_threads: usize) -> Self
Set number of threads for CPU execution
Sourcepub fn with_profiling(self, enable: bool) -> Self
pub fn with_profiling(self, enable: bool) -> Self
Enable profiling
Sourcepub fn optimization_level(&self) -> OptimizationLevel
pub fn optimization_level(&self) -> OptimizationLevel
Get optimization level
Sourcepub fn provider_type(&self) -> ProviderType
pub fn provider_type(&self) -> ProviderType
Get provider type
Trait Implementations§
Source§impl Clone for SessionOptions
impl Clone for SessionOptions
Source§fn clone(&self) -> SessionOptions
fn clone(&self) -> SessionOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionOptions
impl Debug for SessionOptions
Auto Trait Implementations§
impl Freeze for SessionOptions
impl RefUnwindSafe for SessionOptions
impl Send for SessionOptions
impl Sync for SessionOptions
impl Unpin for SessionOptions
impl UnwindSafe for SessionOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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