pub struct ResnetBlock2DConfig {
pub out_channels: Option<usize>,
pub temb_channels: Option<usize>,
pub groups: usize,
pub groups_out: Option<usize>,
pub eps: f64,
pub use_in_shortcut: Option<bool>,
pub output_scale_factor: f64,
}
Expand description
Configuration for a ResNet block.
Fields§
§out_channels: Option<usize>
The number of output channels, defaults to the number of input channels.
temb_channels: Option<usize>
§groups: usize
The number of groups to use in group normalization.
groups_out: Option<usize>
§eps: f64
The epsilon to be used in the group normalization operations.
use_in_shortcut: Option<bool>
Whether to use a 2D convolution in the skip connection. When using None, such a convolution is used if the number of input channels is different from the number of output channels.
output_scale_factor: f64
The final output is scaled by dividing by this value.
Trait Implementations§
source§impl Clone for ResnetBlock2DConfig
impl Clone for ResnetBlock2DConfig
source§fn clone(&self) -> ResnetBlock2DConfig
fn clone(&self) -> ResnetBlock2DConfig
Returns a copy 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 moresource§impl Debug for ResnetBlock2DConfig
impl Debug for ResnetBlock2DConfig
source§impl Default for ResnetBlock2DConfig
impl Default for ResnetBlock2DConfig
impl Copy for ResnetBlock2DConfig
Auto Trait Implementations§
impl Freeze for ResnetBlock2DConfig
impl RefUnwindSafe for ResnetBlock2DConfig
impl Send for ResnetBlock2DConfig
impl Sync for ResnetBlock2DConfig
impl Unpin for ResnetBlock2DConfig
impl UnwindSafe for ResnetBlock2DConfig
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