Struct burn_core::nn::conv::ConvTranspose2dConfig
source · pub struct ConvTranspose2dConfig {
pub channels: [usize; 2],
pub kernel_size: [usize; 2],
pub stride: [usize; 2],
pub dilation: [usize; 2],
pub groups: usize,
pub padding: [usize; 2],
pub padding_out: [usize; 2],
pub bias: bool,
pub initializer: Initializer,
}Expand description
Configuration to create an 2D transposed 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: [usize; 2]The padding configuration.
padding_out: [usize; 2]The padding output configuration.
bias: boolIf bias should be added to the output.
initializer: InitializerThe type of function used to initialize neural network parameters
Implementations§
source§impl ConvTranspose2dConfig
impl ConvTranspose2dConfig
sourcepub fn with_stride(self, stride: [usize; 2]) -> Self
pub fn with_stride(self, stride: [usize; 2]) -> Self
The stride of the convolution.
sourcepub fn with_dilation(self, dilation: [usize; 2]) -> Self
pub fn with_dilation(self, dilation: [usize; 2]) -> 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: [usize; 2]) -> Self
pub fn with_padding(self, padding: [usize; 2]) -> Self
The padding configuration.
sourcepub fn with_padding_out(self, padding_out: [usize; 2]) -> Self
pub fn with_padding_out(self, padding_out: [usize; 2]) -> Self
The padding output 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
source§impl ConvTranspose2dConfig
impl ConvTranspose2dConfig
sourcepub fn init<B: Backend>(&self) -> ConvTranspose2d<B>
pub fn init<B: Backend>(&self) -> ConvTranspose2d<B>
Initialize a new conv transpose 2d module.
sourcepub fn init_with<B: Backend>(
&self,
record: ConvTranspose2dRecord<B>
) -> ConvTranspose2d<B>
pub fn init_with<B: Backend>( &self, record: ConvTranspose2dRecord<B> ) -> ConvTranspose2d<B>
Initialize a new conv transpose 2d module with a record.
Trait Implementations§
source§impl Clone for ConvTranspose2dConfig
impl Clone for ConvTranspose2dConfig
source§impl Config for ConvTranspose2dConfig
impl Config for ConvTranspose2dConfig
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 ConvTranspose2dConfig
impl Debug for ConvTranspose2dConfig
source§impl<'de> Deserialize<'de> for ConvTranspose2dConfig
impl<'de> Deserialize<'de> for ConvTranspose2dConfig
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 ConvTranspose2dConfig
impl Display for ConvTranspose2dConfig
Auto Trait Implementations§
impl RefUnwindSafe for ConvTranspose2dConfig
impl Send for ConvTranspose2dConfig
impl Sync for ConvTranspose2dConfig
impl Unpin for ConvTranspose2dConfig
impl UnwindSafe for ConvTranspose2dConfig
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