pub struct MbConvConfig {
pub in_channels: usize,
pub out_channels: usize,
pub expand_ratio: usize,
pub stride: usize,
pub kernel_size: usize,
pub se_ratio: f32,
pub h: usize,
pub w: usize,
}Expand description
Configuration for a single MBConv block.
Fields§
§in_channels: usizeInput channel count.
out_channels: usizeOutput channel count.
expand_ratio: usizeExpansion ratio for the hidden channel dimension (≥ 1).
stride: usizeStride (1 = same spatial size, 2 = spatial downsampling).
kernel_size: usizeDepthwise convolution kernel size (3 or 5 in EfficientNet).
se_ratio: f32Squeeze-Excite reduction ratio (e.g. 0.25).
h: usizeInput spatial height (used for metadata / future spatial convs).
w: usizeInput spatial width (used for metadata / future spatial convs).
Implementations§
Source§impl MbConvConfig
impl MbConvConfig
Sourcepub fn expanded_channels(&self) -> usize
pub fn expanded_channels(&self) -> usize
Expanded channel count.
Sourcepub fn se_channels(&self) -> usize
pub fn se_channels(&self) -> usize
Squeeze-Excite hidden channel count: max(1, round(in_ch * se_ratio)).
Trait Implementations§
Source§impl Clone for MbConvConfig
impl Clone for MbConvConfig
Source§fn clone(&self) -> MbConvConfig
fn clone(&self) -> MbConvConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MbConvConfig
impl RefUnwindSafe for MbConvConfig
impl Send for MbConvConfig
impl Sync for MbConvConfig
impl Unpin for MbConvConfig
impl UnsafeUnpin for MbConvConfig
impl UnwindSafe for MbConvConfig
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