pub struct PoolingStats {
pub input_shape: Vec<usize>,
pub output_shape: Vec<usize>,
pub kernel_size: Vec<usize>,
pub stride: Vec<usize>,
pub receptive_field_size: usize,
pub compression_ratio: f64,
pub overlap_ratio: f64,
}Expand description
Statistics from a pooling operation.
Fields§
§input_shape: Vec<usize>Shape of the input tensor.
output_shape: Vec<usize>Shape of the output tensor.
kernel_size: Vec<usize>Kernel size for each spatial dimension.
stride: Vec<usize>Stride for each spatial dimension.
receptive_field_size: usizeTotal number of elements in one kernel window (product of kernel dims).
compression_ratio: f64Ratio of input spatial elements to output spatial elements.
overlap_ratio: f64Overlap ratio: how much windows overlap (0 = no overlap).
Implementations§
Source§impl PoolingStats
impl PoolingStats
Sourcepub fn compute(
input_shape: &[usize],
config: &PoolConfig,
) -> Result<Self, PoolingError>
pub fn compute( input_shape: &[usize], config: &PoolConfig, ) -> Result<Self, PoolingError>
Compute pooling statistics from input shape and config.
Trait Implementations§
Source§impl Clone for PoolingStats
impl Clone for PoolingStats
Source§fn clone(&self) -> PoolingStats
fn clone(&self) -> PoolingStats
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 moreAuto Trait Implementations§
impl Freeze for PoolingStats
impl RefUnwindSafe for PoolingStats
impl Send for PoolingStats
impl Sync for PoolingStats
impl Unpin for PoolingStats
impl UnsafeUnpin for PoolingStats
impl UnwindSafe for PoolingStats
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