Here are the Mermaid diagrams for ConvNeXt architecture:
ConvNeXt Block Diagram
mermaid Copy code
graph TD
Input[Input] --> DW[Depthwise Conv 7x7]
DW --> LN1[LayerNorm]
LN1 --> Linear1[Linear: d → 4d]
Linear1 --> GELU[GELU]
GELU --> Linear2[Linear: 4d → d]
Linear2 --> LS[Layer Scale]
LS --> Add[+]
Input --> Add
Add --> Output[Output]
style DW fill:#e1f5fe
style LN1 fill:#fff3e0
style Linear1 fill:#f3e5f5
style GELU fill:#e8f5e9
style Linear2 fill:#f3e5f5
style LS fill:#fce4ec
ConvNeXt General Architecture
mermaid Copy code
graph TD
Input[Input Image<br/>224×224×3] --> Stem[Stem<br/>Conv 4×4, stride 4<br/>56×56×96]
Stem --> Stage1[Stage 1<br/>3 × ConvNeXt Block<br/>56×56×96]
Stage1 --> Down1[Downsample<br/>Conv 2×2, stride 2<br/>28×28×192]
Down1 --> Stage2[Stage 2<br/>3 × ConvNeXt Block<br/>28×28×192]
Stage2 --> Down2[Downsample<br/>Conv 2×2, stride 2<br/>14×14×384]
Down2 --> Stage3[Stage 3<br/>9 × ConvNeXt Block<br/>14×14×384]
Stage3 --> Down3[Downsample<br/>Conv 2×2, stride 2<br/>7×7×768]
Down3 --> Stage4[Stage 4<br/>3 × ConvNeXt Block<br/>7×7×768]
Stage4 --> GAP[Global Average Pool<br/>1×1×768]
GAP --> LN[LayerNorm]
LN --> FC[Linear Classifier<br/>1000 classes]
FC --> Output[Output]
style Stem fill:#e3f2fd
style Stage1 fill:#e8eaf6
style Stage2 fill:#e8eaf6
style Stage3 fill:#e8eaf6
style Stage4 fill:#e8eaf6
style Down1 fill:#ffebee
style Down2 fill:#ffebee
style Down3 fill:#ffebee
style GAP fill:#e0f2f1
style LN fill:#fff3e0
style FC fill:#f3e5f5
The first diagram shows the ConvNeXt block structure with its key components: depthwise convolution, layer normalization, inverted bottleneck with expansion ratio 4, GELU activation, and layer scale. The second diagram illustrates the overall ConvNeXt architecture with its four stages, showing the progression of spatial resolution and channel dimensions through the network.