pub struct InterpolateOptions {
pub mode: InterpolateMode,
pub align_corners: bool,
}Expand description
Interpolation options.
Fields§
§mode: InterpolateModeAlgorithm used for upsampling.
align_corners: boolIf true, the input and output tensors are aligned by their corner pixels.
If false, half-pixel coordinate mapping is used instead.
Implementations§
Source§impl InterpolateOptions
impl InterpolateOptions
Sourcepub fn new(mode: InterpolateMode) -> InterpolateOptions
pub fn new(mode: InterpolateMode) -> InterpolateOptions
Create new interpolate options with the given mode.
Defaults to align_corners = true.
Sourcepub fn with_align_corners(self, align_corners: bool) -> InterpolateOptions
pub fn with_align_corners(self, align_corners: bool) -> InterpolateOptions
Set align_corners.
Trait Implementations§
Source§impl Clone for InterpolateOptions
impl Clone for InterpolateOptions
Source§fn clone(&self) -> InterpolateOptions
fn clone(&self) -> InterpolateOptions
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 moreAuto Trait Implementations§
impl Freeze for InterpolateOptions
impl RefUnwindSafe for InterpolateOptions
impl Send for InterpolateOptions
impl Sync for InterpolateOptions
impl Unpin for InterpolateOptions
impl UnsafeUnpin for InterpolateOptions
impl UnwindSafe for InterpolateOptions
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