Struct burn_core::nn::conv::Conv1dConfig
source · pub struct Conv1dConfig {
pub channels_in: usize,
pub channels_out: usize,
pub kernel_size: usize,
pub stride: usize,
pub dilation: usize,
pub groups: usize,
pub padding: PaddingConfig1d,
pub bias: bool,
pub initializer: Initializer,
}Expand description
Configuration to create an 1D convolution layer.
Fields§
§channels_in: usizeThe number of input channels.
channels_out: usizeThe number of output channels.
kernel_size: usizeThe size of the kernel.
stride: usizeThe stride of the convolution.
dilation: usizeSpacing between kernel elements.
groups: usizeControls the connections between input and output channels.
padding: PaddingConfig1dThe padding configuration.
bias: boolIf bias should be added to the output.
initializer: InitializerThe type of function used to initialize neural network parameters
Implementations§
source§impl Conv1dConfig
impl Conv1dConfig
source§impl Conv1dConfig
impl Conv1dConfig
sourcepub fn with_stride(self, stride: usize) -> Self
pub fn with_stride(self, stride: usize) -> Self
The stride of the convolution.
sourcepub fn with_dilation(self, dilation: usize) -> Self
pub fn with_dilation(self, dilation: usize) -> Self
Spacing between kernel elements.
sourcepub fn with_groups(self, groups: usize) -> Self
pub fn with_groups(self, groups: usize) -> Self
Controls the connections between input and output channels.
sourcepub fn with_padding(self, padding: PaddingConfig1d) -> Self
pub fn with_padding(self, padding: PaddingConfig1d) -> Self
The padding configuration.
sourcepub fn with_initializer(self, initializer: Initializer) -> Self
pub fn with_initializer(self, initializer: Initializer) -> Self
The type of function used to initialize neural network parameters
Trait Implementations§
source§impl Clone for Conv1dConfig
impl Clone for Conv1dConfig
source§impl Config for Conv1dConfig
impl Config for Conv1dConfig
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 Debug for Conv1dConfig
impl Debug for Conv1dConfig
source§impl<'de> Deserialize<'de> for Conv1dConfig
impl<'de> Deserialize<'de> for Conv1dConfig
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 Conv1dConfig
impl Display for Conv1dConfig
Auto Trait Implementations§
impl RefUnwindSafe for Conv1dConfig
impl Send for Conv1dConfig
impl Sync for Conv1dConfig
impl Unpin for Conv1dConfig
impl UnwindSafe for Conv1dConfig
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