MobileNetV4 s
Fit diagram
Read at 100%
Clear selection
Download SVG
Download PNG
Click a block to read its description, or select it with Tab and Enter.
MobileNetV4 s
Classification, 224 × 224 input, 1,000 classes. Tensor sizes exclude batch.
LibreYOLO
MobileNetV4 s
Classification, 224 × 224 input, 1,000 classes. Tensor sizes exclude batch.
Network
Input
3 × 224 × 224
Conv2d 3×3 / 2
32 × 112 × 112; p=1, g=1
BatchNorm2d
32 × 112 × 112
ReLU
32 × 112 × 112
Layer 1: ConvBnAct
32 × 56 × 56, repeat 1
Layer 1: ConvBnAct
32 × 56 × 56, repeat 1
Layer 2: ConvBnAct
96 × 28 × 28, repeat 1
Layer 2: ConvBnAct
64 × 28 × 28, repeat 1
Layer 3: UniversalInvertedResidual
96 × 14 × 14, repeat 1
Layer 3: UniversalInvertedResidual
96 × 14 × 14, repeat 4
Layer 3: UniversalInvertedResidual
96 × 14 × 14, repeat 1
Layer 4: UniversalInvertedResidual
128 × 7 × 7, repeat 1
Layer 4: UniversalInvertedResidual
128 × 7 × 7, repeat 1
Layer 4: UniversalInvertedResidual
128 × 7 × 7, repeat 1
Layer 4: UniversalInvertedResidual
128 × 7 × 7, repeat 1
Layer 4: UniversalInvertedResidual
128 × 7 × 7, repeat 2
Layer 5: ConvBnAct
960 × 7 × 7, repeat 1
AdaptiveAvgPool2d
960 × 1 × 1
Conv2d 1×1 / 1
1280 × 1 × 1; p=0, g=1
BatchNorm2d
1280 × 1 × 1
ReLU
1,280 × 1 × 1
Flatten
1,280
Linear
1280 to 1000
Layer 1, unit 1
ConvBnAct
Input 32 × 112 × 112
Conv2d 3×3 / 2
32 × 56 × 56; p=1, g=1
BatchNorm2d
32 × 56 × 56
ReLU
32 × 56 × 56
Output 32 × 56 × 56
Repeat 1 times
Layer 1, unit 2
ConvBnAct
Input 32 × 56 × 56
Conv2d 1×1 / 1
32 × 56 × 56; p=0, g=1
BatchNorm2d
32 × 56 × 56
ReLU
32 × 56 × 56
Output 32 × 56 × 56
Repeat 1 times
Layer 2, unit 1
ConvBnAct
Input 32 × 56 × 56
Conv2d 3×3 / 2
96 × 28 × 28; p=1, g=1
BatchNorm2d
96 × 28 × 28
ReLU
96 × 28 × 28
Output 96 × 28 × 28
Repeat 1 times
Layer 2, unit 2
ConvBnAct
Input 96 × 28 × 28
Conv2d 1×1 / 1
64 × 28 × 28; p=0, g=1
BatchNorm2d
64 × 28 × 28
ReLU
64 × 28 × 28
Output 64 × 28 × 28
Repeat 1 times
Layer 3, unit 1
UniversalInvertedResidual
Input 64 × 28 × 28
Conv2d 5×5 / 1
64 × 28 × 28; p=2, g=64
BatchNorm2d
64 × 28 × 28
Conv2d 1×1 / 1
192 × 28 × 28; p=0, g=1
BatchNorm2d
192 × 28 × 28
ReLU
192 × 28 × 28
Conv2d 5×5 / 2
192 × 14 × 14; p=2, g=192
BatchNorm2d
192 × 14 × 14
ReLU
192 × 14 × 14
Conv2d 1×1 / 1
96 × 14 × 14; p=0, g=1
BatchNorm2d
96 × 14 × 14
Output 96 × 14 × 14
Repeat 1 times
Layer 3, unit 2
UniversalInvertedResidual
Input 96 × 14 × 14
Conv2d 1×1 / 1
192 × 14 × 14; p=0, g=1
BatchNorm2d
192 × 14 × 14
ReLU
192 × 14 × 14
Conv2d 3×3 / 1
192 × 14 × 14; p=1, g=192
BatchNorm2d
192 × 14 × 14
ReLU
192 × 14 × 14
Conv2d 1×1 / 1
96 × 14 × 14; p=0, g=1
BatchNorm2d
96 × 14 × 14
+
Output 96 × 14 × 14
Repeat 4 times
Layer 3, unit 6
UniversalInvertedResidual
Input 96 × 14 × 14
Conv2d 3×3 / 1
96 × 14 × 14; p=1, g=96
BatchNorm2d
96 × 14 × 14
Conv2d 1×1 / 1
384 × 14 × 14; p=0, g=1
BatchNorm2d
384 × 14 × 14
ReLU
384 × 14 × 14
Conv2d 1×1 / 1
96 × 14 × 14; p=0, g=1
BatchNorm2d
96 × 14 × 14
+
Output 96 × 14 × 14
Repeat 1 times
Layer 4, unit 1
UniversalInvertedResidual
Input 96 × 14 × 14
Conv2d 3×3 / 1
96 × 14 × 14; p=1, g=96
BatchNorm2d
96 × 14 × 14
Conv2d 1×1 / 1
576 × 14 × 14; p=0, g=1
BatchNorm2d
576 × 14 × 14
ReLU
576 × 14 × 14
Conv2d 3×3 / 2
576 × 7 × 7; p=1, g=576
BatchNorm2d
576 × 7 × 7
ReLU
576 × 7 × 7
Conv2d 1×1 / 1
128 × 7 × 7; p=0, g=1
BatchNorm2d
128 × 7 × 7
Output 128 × 7 × 7
Repeat 1 times
Layer 4, unit 2
UniversalInvertedResidual
Input 128 × 7 × 7
Conv2d 5×5 / 1
128 × 7 × 7; p=2, g=128
BatchNorm2d
128 × 7 × 7
Conv2d 1×1 / 1
512 × 7 × 7; p=0, g=1
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 5×5 / 1
512 × 7 × 7; p=2, g=512
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 1×1 / 1
128 × 7 × 7; p=0, g=1
BatchNorm2d
128 × 7 × 7
+
Output 128 × 7 × 7
Repeat 1 times
Layer 4, unit 3
UniversalInvertedResidual
Input 128 × 7 × 7
Conv2d 1×1 / 1
512 × 7 × 7; p=0, g=1
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 5×5 / 1
512 × 7 × 7; p=2, g=512
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 1×1 / 1
128 × 7 × 7; p=0, g=1
BatchNorm2d
128 × 7 × 7
+
Output 128 × 7 × 7
Repeat 1 times
Layer 4, unit 4
UniversalInvertedResidual
Input 128 × 7 × 7
Conv2d 1×1 / 1
384 × 7 × 7; p=0, g=1
BatchNorm2d
384 × 7 × 7
ReLU
384 × 7 × 7
Conv2d 5×5 / 1
384 × 7 × 7; p=2, g=384
BatchNorm2d
384 × 7 × 7
ReLU
384 × 7 × 7
Conv2d 1×1 / 1
128 × 7 × 7; p=0, g=1
BatchNorm2d
128 × 7 × 7
+
Output 128 × 7 × 7
Repeat 1 times
Layer 4, unit 5
UniversalInvertedResidual
Input 128 × 7 × 7
Conv2d 1×1 / 1
512 × 7 × 7; p=0, g=1
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 3×3 / 1
512 × 7 × 7; p=1, g=512
BatchNorm2d
512 × 7 × 7
ReLU
512 × 7 × 7
Conv2d 1×1 / 1
128 × 7 × 7; p=0, g=1
BatchNorm2d
128 × 7 × 7
+
Output 128 × 7 × 7
Repeat 2 times
Layer 5, unit 1
ConvBnAct
Input 128 × 7 × 7
Conv2d 1×1 / 1
960 × 7 × 7; p=0, g=1
BatchNorm2d
960 × 7 × 7
ReLU
960 × 7 × 7
Output 960 × 7 × 7
Repeat 1 times
Repeated units are grouped only when operation parameters, tensor shapes and shortcut behavior match.
Source: libreyolo/models/mobilenetv4/nn.py. Revision a4d0ecc9e17f.
libreyolo.com