pub struct SessionOptions { /* private fields */ }Expand description
Options for constructing the ONNX session.
This stays small: deployment-specific knobs (intra-thread count,
inter-thread count, execution providers) belong one layer up and
should be applied to a manually built ort::Session passed into
crate::Vad::from_ort_session.
Implementations§
Source§impl SessionOptions
impl SessionOptions
Sourcepub const fn optimization_level(&self) -> GraphOptimizationLevel
pub const fn optimization_level(&self) -> GraphOptimizationLevel
Returns the graph optimization level used when constructing the ONNX session.
Sourcepub const fn set_optimization_level(
&mut self,
level: GraphOptimizationLevel,
) -> &mut Self
pub const fn set_optimization_level( &mut self, level: GraphOptimizationLevel, ) -> &mut Self
Set the graph optimization level (&mut Self for chaining).
Sourcepub const fn with_optimization_level(
self,
level: GraphOptimizationLevel,
) -> Self
pub const fn with_optimization_level( self, level: GraphOptimizationLevel, ) -> Self
Builder variant of Self::set_optimization_level.
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 (const: unstable) · 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
Source§impl Default for SessionOptions
impl Default for SessionOptions
Source§impl<'de> Deserialize<'de> for SessionOptions
impl<'de> Deserialize<'de> for SessionOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionOptions
impl RefUnwindSafe for SessionOptions
impl Send for SessionOptions
impl Sync for SessionOptions
impl Unpin for SessionOptions
impl UnsafeUnpin 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