Struct burn_core::nn::pool::AvgPool1dConfig
source · pub struct AvgPool1dConfig {
pub kernel_size: usize,
pub stride: usize,
pub padding: PaddingConfig1d,
/* private fields */
}Expand description
Configuration to create a 1D avg pooling layer.
Fields§
§kernel_size: usizeThe size of the kernel.
stride: usizeThe stride.
padding: PaddingConfig1dThe padding configuration.
Implementations§
source§impl AvgPool1dConfig
impl AvgPool1dConfig
sourcepub fn with_stride(self, stride: usize) -> Self
pub fn with_stride(self, stride: usize) -> Self
The stride.
sourcepub fn with_padding(self, padding: PaddingConfig1d) -> Self
pub fn with_padding(self, padding: PaddingConfig1d) -> Self
The padding configuration.
sourcepub fn with_count_include_pad(self, count_include_pad: bool) -> Self
pub fn with_count_include_pad(self, count_include_pad: bool) -> Self
If the padding is counted in the denominator when computing the average.
source§impl AvgPool1dConfig
impl AvgPool1dConfig
sourcepub fn init(&self) -> AvgPool1d
pub fn init(&self) -> AvgPool1d
Initialize a new avg pool 1d module.
Trait Implementations§
source§impl Clone for AvgPool1dConfig
impl Clone for AvgPool1dConfig
source§impl Config for AvgPool1dConfig
impl Config for AvgPool1dConfig
source§fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
Saves the configuration to a file. Read more
source§fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
Loads the configuration from a file. Read more
source§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
source§impl<'de> Deserialize<'de> for AvgPool1dConfig
impl<'de> Deserialize<'de> for AvgPool1dConfig
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for AvgPool1dConfig
impl Display for AvgPool1dConfig
Auto Trait Implementations§
impl RefUnwindSafe for AvgPool1dConfig
impl Send for AvgPool1dConfig
impl Sync for AvgPool1dConfig
impl Unpin for AvgPool1dConfig
impl UnwindSafe for AvgPool1dConfig
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