Struct burn_core::nn::conv::Conv2dConfig
source · pub struct Conv2dConfig {
pub channels: [usize; 2],
pub kernel_size: [usize; 2],
pub stride: [usize; 2],
pub dilation: [usize; 2],
pub groups: usize,
pub padding: Conv2dPaddingConfig,
pub bias: bool,
pub initializer: Initializer,
}Expand description
Configuration to create an 2D convolution layer.
Fields§
§channels: [usize; 2]The number of channels.
kernel_size: [usize; 2]The size of the kernel.
stride: [usize; 2]The stride of the convolution.
dilation: [usize; 2]Spacing between kernel elements.
groups: usizeControls the connections between input and output channels.
padding: Conv2dPaddingConfigThe 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 Conv2dConfig
impl Conv2dConfig
pub fn with_stride(self, stride: [usize; 2]) -> Self
pub fn with_dilation(self, dilation: [usize; 2]) -> Self
pub fn with_groups(self, groups: usize) -> Self
pub fn with_padding(self, padding: Conv2dPaddingConfig) -> Self
pub fn with_bias(self, bias: bool) -> Self
pub fn with_initializer(self, initializer: Initializer) -> Self
Trait Implementations§
source§impl Clone for Conv2dConfig
impl Clone for Conv2dConfig
source§impl Config for Conv2dConfig
impl Config for Conv2dConfig
source§impl<'de> Deserialize<'de> for Conv2dConfig
impl<'de> Deserialize<'de> for Conv2dConfig
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 Conv2dConfig
impl Display for Conv2dConfig
Auto Trait Implementations§
impl RefUnwindSafe for Conv2dConfig
impl Send for Conv2dConfig
impl Sync for Conv2dConfig
impl Unpin for Conv2dConfig
impl UnwindSafe for Conv2dConfig
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