pub struct MaxPool2dConfig {
pub kernel_size: [usize; 2],
pub strides: [usize; 2],
pub padding: PaddingConfig2d,
pub dilation: [usize; 2],
pub ceil_mode: bool,
pub auto_pad: AutoPad,
pub storage_order: i64,
}Expand description
Configuration for MaxPool2d operations
Fields§
§kernel_size: [usize; 2]Kernel size [height, width]
strides: [usize; 2]Stride [height, width]
padding: PaddingConfig2dPadding configuration
dilation: [usize; 2]Dilation [height, width]
ceil_mode: boolWhether to use ceil mode for output size calculation (opset 10+)
auto_pad: AutoPadAuto padding mode
storage_order: i64Layout of the optional Indices output: 0 flattens row-major (default), 1 column-major within each spatial plane.
Implementations§
Source§impl MaxPool2dConfig
impl MaxPool2dConfig
Sourcepub fn with_strides(self, strides: [usize; 2]) -> Self
pub fn with_strides(self, strides: [usize; 2]) -> Self
Set the strides
Sourcepub fn with_padding(self, padding: PaddingConfig2d) -> Self
pub fn with_padding(self, padding: PaddingConfig2d) -> Self
Set the padding configuration
Sourcepub fn with_dilation(self, dilation: [usize; 2]) -> Self
pub fn with_dilation(self, dilation: [usize; 2]) -> Self
Set the dilation
Trait Implementations§
Source§impl Clone for MaxPool2dConfig
impl Clone for MaxPool2dConfig
Auto Trait Implementations§
impl Freeze for MaxPool2dConfig
impl RefUnwindSafe for MaxPool2dConfig
impl Send for MaxPool2dConfig
impl Sync for MaxPool2dConfig
impl Unpin for MaxPool2dConfig
impl UnsafeUnpin for MaxPool2dConfig
impl UnwindSafe for MaxPool2dConfig
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