Struct dfdx::nn::MinPoolGlobal
source · [−]pub struct MinPoolGlobal;
Expand description
Applies min pooling over an entire image, fully reducing the height and width dimensions:
- Reduces 2d (C, L) to 1d (C, )
- Reduces 3d (C, H, W) to 1d (C, )
- Reduces 4d (B, C, H, W) to 2d (B, C)
Pytorch equivalent: torch.nn.AdaptiveMinPool2d(1)
followed by a flatten.
Examples:
let m: MinPoolGlobal = Default::default();
let _: Tensor1D<5> = m.forward(Tensor3D::<5, 16, 8>::zeros());
let _: Tensor2D<10, 5> = m.forward(Tensor4D::<10, 5, 16, 8>::zeros());
Trait Implementations
sourceimpl CanUpdateWithGradients for MinPoolGlobal
impl CanUpdateWithGradients for MinPoolGlobal
sourcefn update<G: GradientProvider>(&mut self, _: &mut G, _: &mut UnusedTensors)
fn update<G: GradientProvider>(&mut self, _: &mut G, _: &mut UnusedTensors)
Updates self given the GradientProvider. When any parameters that
are NOT present in
G
, then this function should
add the tensor’s UniqueId to UnusedTensors. Read moresourceimpl Clone for MinPoolGlobal
impl Clone for MinPoolGlobal
sourcefn clone(&self) -> MinPoolGlobal
fn clone(&self) -> MinPoolGlobal
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Default for MinPoolGlobal
impl Default for MinPoolGlobal
sourcefn default() -> MinPoolGlobal
fn default() -> MinPoolGlobal
Returns the “default value” for a type. Read more
sourceimpl LoadFromNpz for MinPoolGlobal
impl LoadFromNpz for MinPoolGlobal
sourceimpl<const C: usize, const H: usize, const W: usize, T: Tape> Module<Tensor3D<C, H, W, T>> for MinPoolGlobal
impl<const C: usize, const H: usize, const W: usize, T: Tape> Module<Tensor3D<C, H, W, T>> for MinPoolGlobal
sourceimpl<const B: usize, const C: usize, const H: usize, const W: usize, T: Tape> Module<Tensor4D<B, C, H, W, T>> for MinPoolGlobal
impl<const B: usize, const C: usize, const H: usize, const W: usize, T: Tape> Module<Tensor4D<B, C, H, W, T>> for MinPoolGlobal
sourceimpl<T> ModuleMut<T> for MinPoolGlobalwhere
Self: Module<T>,
impl<T> ModuleMut<T> for MinPoolGlobalwhere
Self: Module<T>,
type Output = <MinPoolGlobal as Module<T>>::Output
type Output = <MinPoolGlobal as Module<T>>::Output
The type that this unit produces given
Input
.sourcefn forward_mut(&mut self, input: T) -> Self::Output
fn forward_mut(&mut self, input: T) -> Self::Output
sourceimpl ResetParams for MinPoolGlobal
impl ResetParams for MinPoolGlobal
sourceimpl SaveToNpz for MinPoolGlobal
impl SaveToNpz for MinPoolGlobal
impl Copy for MinPoolGlobal
Auto Trait Implementations
impl RefUnwindSafe for MinPoolGlobal
impl Send for MinPoolGlobal
impl Sync for MinPoolGlobal
impl Unpin for MinPoolGlobal
impl UnwindSafe for MinPoolGlobal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more