pub struct AdaptiveMaxPool2dLayer { /* private fields */ }Expand description
Adaptive max pooling: output a fixed spatial size.
Implementations§
Source§impl AdaptiveMaxPool2dLayer
impl AdaptiveMaxPool2dLayer
pub fn new(out_h: usize, out_w: usize) -> Self
pub fn output_h(&self) -> usize
pub fn output_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 AdaptiveMaxPool2dLayer
impl Clone for AdaptiveMaxPool2dLayer
Source§fn clone(&self) -> AdaptiveMaxPool2dLayer
fn clone(&self) -> AdaptiveMaxPool2dLayer
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 AdaptiveMaxPool2dLayer
impl Debug for AdaptiveMaxPool2dLayer
Source§impl PartialEq for AdaptiveMaxPool2dLayer
impl PartialEq for AdaptiveMaxPool2dLayer
impl Copy for AdaptiveMaxPool2dLayer
impl Eq for AdaptiveMaxPool2dLayer
impl StructuralPartialEq for AdaptiveMaxPool2dLayer
Auto Trait Implementations§
impl Freeze for AdaptiveMaxPool2dLayer
impl RefUnwindSafe for AdaptiveMaxPool2dLayer
impl Send for AdaptiveMaxPool2dLayer
impl Sync for AdaptiveMaxPool2dLayer
impl Unpin for AdaptiveMaxPool2dLayer
impl UnsafeUnpin for AdaptiveMaxPool2dLayer
impl UnwindSafe for AdaptiveMaxPool2dLayer
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