pub struct GlobalAvgPool2d;Expand description
Global Average Pooling 2D.
Pools over the entire spatial dimension, outputting one value per channel.
§Shape
- Input:
(N, C, H, W) - Output:
(N, C)
Implementations§
Trait Implementations§
Source§impl Debug for GlobalAvgPool2d
impl Debug for GlobalAvgPool2d
Source§impl Default for GlobalAvgPool2d
impl Default for GlobalAvgPool2d
Source§fn default() -> GlobalAvgPool2d
fn default() -> GlobalAvgPool2d
Returns the “default value” for a type. Read more
Source§impl Module for GlobalAvgPool2d
impl Module for GlobalAvgPool2d
Source§fn parameters_mut(&mut self) -> Vec<&mut Tensor>
fn parameters_mut(&mut self) -> Vec<&mut Tensor>
Get mutable references to all learnable parameters. Read more
Source§fn refresh_caches(&mut self)
fn refresh_caches(&mut self)
Refresh any cached computations after parameters have been modified. Read more
Source§fn num_parameters(&self) -> usize
fn num_parameters(&self) -> usize
Get the number of learnable parameters.
Auto Trait Implementations§
impl Freeze for GlobalAvgPool2d
impl RefUnwindSafe for GlobalAvgPool2d
impl Send for GlobalAvgPool2d
impl Sync for GlobalAvgPool2d
impl Unpin for GlobalAvgPool2d
impl UnsafeUnpin for GlobalAvgPool2d
impl UnwindSafe for GlobalAvgPool2d
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> 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