pub struct MaxPool2dLayer { /* private fields */ }Expand description
2D max-pooling layer (NHWC layout).
Implementations§
Source§impl MaxPool2dLayer
impl MaxPool2dLayer
pub fn new( kernel_h: usize, kernel_w: usize, stride_h: usize, stride_w: usize, ) -> Result<Self, ModelError>
pub fn kernel_h(&self) -> usize
pub fn kernel_w(&self) -> usize
pub fn stride_h(&self) -> usize
pub fn stride_w(&self) -> usize
pub fn forward( &self, graph: &mut Graph, input: NodeId, ) -> Result<NodeId, ModelError>
pub fn forward_inference(&self, input: &Tensor) -> Result<Tensor, ModelError>
Trait Implementations§
Source§impl Clone for MaxPool2dLayer
impl Clone for MaxPool2dLayer
Source§fn clone(&self) -> MaxPool2dLayer
fn clone(&self) -> MaxPool2dLayer
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 MaxPool2dLayer
impl Debug for MaxPool2dLayer
Source§impl PartialEq for MaxPool2dLayer
impl PartialEq for MaxPool2dLayer
impl Copy for MaxPool2dLayer
impl Eq for MaxPool2dLayer
impl StructuralPartialEq for MaxPool2dLayer
Auto Trait Implementations§
impl Freeze for MaxPool2dLayer
impl RefUnwindSafe for MaxPool2dLayer
impl Send for MaxPool2dLayer
impl Sync for MaxPool2dLayer
impl Unpin for MaxPool2dLayer
impl UnsafeUnpin for MaxPool2dLayer
impl UnwindSafe for MaxPool2dLayer
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