pub struct MbConvBlock {
pub expand_conv: Option<Conv2dLayer>,
pub expand_bn: Option<BatchNorm2dLayer>,
pub depthwise_w: Tensor,
pub depthwise_bn: BatchNorm2dLayer,
pub se: Option<SqueezeExciteBlock>,
pub project_conv: Conv2dLayer,
pub project_bn: BatchNorm2dLayer,
pub use_residual: bool,
pub expanded_ch: usize,
}Expand description
MBConv block (EfficientNet / MobileNetV2 inverted residual, inference-mode).
Structure: expand 1x1 -> BN -> activation -> depthwise 3x3 -> BN -> activation -> SE -> project 1x1 -> BN. Supports optional skip connection when stride=1 and in_channels=out_channels.
Fields§
§expand_conv: Option<Conv2dLayer>§expand_bn: Option<BatchNorm2dLayer>§depthwise_w: Tensor§depthwise_bn: BatchNorm2dLayer§se: Option<SqueezeExciteBlock>§project_conv: Conv2dLayer§project_bn: BatchNorm2dLayer§use_residual: bool§expanded_ch: usizeImplementations§
Auto Trait Implementations§
impl Freeze for MbConvBlock
impl RefUnwindSafe for MbConvBlock
impl Send for MbConvBlock
impl Sync for MbConvBlock
impl Unpin for MbConvBlock
impl UnsafeUnpin for MbConvBlock
impl UnwindSafe for MbConvBlock
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more