pub struct AvgPool2dLayer { /* private fields */ }Expand description
2D average-pooling layer (NHWC layout).
Implementations§
Source§impl AvgPool2dLayer
impl AvgPool2dLayer
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 AvgPool2dLayer
impl Clone for AvgPool2dLayer
Source§fn clone(&self) -> AvgPool2dLayer
fn clone(&self) -> AvgPool2dLayer
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 AvgPool2dLayer
impl Debug for AvgPool2dLayer
Source§impl PartialEq for AvgPool2dLayer
impl PartialEq for AvgPool2dLayer
impl Copy for AvgPool2dLayer
impl Eq for AvgPool2dLayer
impl StructuralPartialEq for AvgPool2dLayer
Auto Trait Implementations§
impl Freeze for AvgPool2dLayer
impl RefUnwindSafe for AvgPool2dLayer
impl Send for AvgPool2dLayer
impl Sync for AvgPool2dLayer
impl Unpin for AvgPool2dLayer
impl UnsafeUnpin for AvgPool2dLayer
impl UnwindSafe for AvgPool2dLayer
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