Struct dfdx::nn::modules::MinPoolGlobal
source · pub struct MinPoolGlobal;
Expand description
Applies min pooling over an entire image, fully reducing the height and width dimensions:
- 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 _: Tensor<Rank1<5>, f32, _> = m.forward(dev.zeros::<Rank3<5, 16, 8>>());
let _: Tensor<Rank2<10, 5>, f32, _> = m.forward(dev.zeros::<Rank4<10, 5, 16, 8>>());
Trait Implementations§
source§impl Clone for MinPoolGlobal
impl Clone for MinPoolGlobal
source§fn clone(&self) -> MinPoolGlobal
fn clone(&self) -> MinPoolGlobal
Returns a copy 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 Default for MinPoolGlobal
impl Default for MinPoolGlobal
source§fn default() -> MinPoolGlobal
fn default() -> MinPoolGlobal
Returns the “default value” for a type. Read more