ConvNeXt t
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.
ConvNeXt t
Classification, 224 × 224 input, 1,000 classes. Tensor sizes exclude batch.
LibreYOLO
ConvNeXt t
Classification, 224 × 224 input, 1,000 classes. Tensor sizes exclude batch.
Network
Input
3 × 224 × 224
Conv2d 4×4 / 4
96 × 56 × 56
LayerNorm over channels
96 × 56 × 56
Stage 1
96 × 56 × 56, n=3
Stage 2
192 × 28 × 28, n=3
Stage 3
384 × 14 × 14, n=9
Stage 4
768 × 7 × 7, n=3
AdaptiveAvgPool2d
768 × 1 × 1
LayerNorm over channels
768 × 1 × 1
Flatten
768
Linear classifier
768 to 1,000 logits
Stage 1
Identity downsample
96 × 56 × 56
ConvNeXtBlock, repeat 3 times
Depthwise Conv2d 7×7
96 channels, g=96, s=1, p=3
Permute NCHW to NHWC
56 × 56 × 96
LayerNorm
96 channels, eps=1e-6
Linear
96 to 384
GELU
56 × 56 × 384
Linear
384 to 96
Permute NHWC to NCHW
96 × 56 × 56
Multiply layer scale
Learned gamma: 96 channels
+
Output 96 × 56 × 56
Stage 2
LayerNorm over channels
96 × 56 × 56
Conv2d 2×2 / 2
96 to 192, p=0
ConvNeXtBlock, repeat 3 times
Depthwise Conv2d 7×7
192 channels, g=192, s=1, p=3
Permute NCHW to NHWC
28 × 28 × 192
LayerNorm
192 channels, eps=1e-6
Linear
192 to 768
GELU
28 × 28 × 768
Linear
768 to 192
Permute NHWC to NCHW
192 × 28 × 28
Multiply layer scale
Learned gamma: 192 channels
+
Output 192 × 28 × 28
Stage 3
LayerNorm over channels
192 × 28 × 28
Conv2d 2×2 / 2
192 to 384, p=0
ConvNeXtBlock, repeat 9 times
Depthwise Conv2d 7×7
384 channels, g=384, s=1, p=3
Permute NCHW to NHWC
14 × 14 × 384
LayerNorm
384 channels, eps=1e-6
Linear
384 to 1536
GELU
14 × 14 × 1536
Linear
1536 to 384
Permute NHWC to NCHW
384 × 14 × 14
Multiply layer scale
Learned gamma: 384 channels
+
Output 384 × 14 × 14
Stage 4
LayerNorm over channels
384 × 14 × 14
Conv2d 2×2 / 2
384 to 768, p=0
ConvNeXtBlock, repeat 3 times
Depthwise Conv2d 7×7
768 channels, g=768, s=1, p=3
Permute NCHW to NHWC
7 × 7 × 768
LayerNorm
768 channels, eps=1e-6
Linear
768 to 3072
GELU
7 × 7 × 3072
Linear
3072 to 768
Permute NHWC to NCHW
768 × 7 × 7
Multiply layer scale
Learned gamma: 768 channels
+
Output 768 × 7 × 7
Variant values
Size
C1, C2, C3, C4: stage channels
n1, n2, n3, n4: block counts
t
96, 192, 384, 768
3, 3, 9, 3
s
96, 192, 384, 768
3, 3, 27, 3
b
128, 256, 512, 1024
3, 3, 27, 3
Source: libreyolo/models/convnext/nn.py. Revision a4d0ecc9e17f.
libreyolo.com