pub enum ShapeInferenceMode {
Off,
On,
Strict,
}Expand description
Set whether shape and type inference is run when loading a model.
Variants§
Off
Do not run shape inference
On
Run shape inference in best-effort mode.
If shape inference is unsupported or fails for any operators, the model will still load but some optimizations might be missed.
Strict
Run shape inference in strict mode.
The model will fail to load if shape inference cannot infer the shapes or types of any values.
Trait Implementations§
Source§impl Clone for ShapeInferenceMode
impl Clone for ShapeInferenceMode
Source§fn clone(&self) -> ShapeInferenceMode
fn clone(&self) -> ShapeInferenceMode
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 ShapeInferenceMode
impl Debug for ShapeInferenceMode
Source§impl PartialEq for ShapeInferenceMode
impl PartialEq for ShapeInferenceMode
impl StructuralPartialEq for ShapeInferenceMode
Auto Trait Implementations§
impl Freeze for ShapeInferenceMode
impl RefUnwindSafe for ShapeInferenceMode
impl Send for ShapeInferenceMode
impl Sync for ShapeInferenceMode
impl Unpin for ShapeInferenceMode
impl UnsafeUnpin for ShapeInferenceMode
impl UnwindSafe for ShapeInferenceMode
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> 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