Skip to content

cifar10_architecture.mmd

CIFAR-10 architecture diagram - 51 lines. View on GitHub (image/cifar10_architecture.mmd).

Rendering diagram…

graph TD
    INPUT["CIFAR-10 Input<br/><i>N × 1 × 32 × 32 Grayscale</i>"]

    subgraph CF["Convolutional Front-End"]
        direction LR
        C1["Conv2d 1→64<br/>BN + ReLU<br/><i>64 × 32 × 32</i>"]
        C2["Conv2d 64→128<br/>BN + ReLU + MaxPool<br/><i>128 × 16 × 16</i>"]
        C3["Conv2d 128→256<br/>BN + ReLU + MaxPool + Dropout<br/><i>256 × 8 × 8</i>"]
        C1 --> C2 --> C3
    end

    FL["Flatten + Linear + LayerNorm<br/><i>16384 → 1024</i>"]
    DY["DyNED<br/>256 levels"]

    subgraph SL["cAdLIF Spiking Layers"]
        direction LR
        S1["Linear + BN + Delay + cAdLIF<br/>Drop 0.1<br/><i>1024 → 1024</i><br/>Surrogate: ArcTan"]
        S2["Linear + BN + Delay + cAdLIF<br/>Drop 0.1<br/><i>1024 → 512</i><br/>Surrogate: ArcTan"]
        S3["Linear + BN + Delay + cAdLIF<br/>Drop 0.1<br/><i>512 → 256</i><br/>Surrogate: ArcTan"]
        S4["Readout: Linear + Leaky Integrator<br/><i>256 → 10</i>"]
        S1 --> S2 --> S3 --> S4
    end

    TS["25 Time Steps per Input"]
    TET["TET Loss<br/>(starts at epoch 50)"]
    CLASS["10 CIFAR-10 Classes"]

    INPUT --> CF
    CF --> FL
    FL --> DY
    DY --> SL
    TS -.- SL
    TET -.- SL
    SL --> CLASS

    classDef inputStyle fill:#27AE60,stroke:#1E8449,color:white,font-weight:bold,font-size:20px
    classDef convStyle fill:#3498DB,stroke:#2471A3,color:white,font-weight:bold,font-size:20px
    classDef projStyle fill:#8E44AD,stroke:#6C3483,color:white,font-weight:bold,font-size:20px
    classDef dynedStyle fill:#E67E22,stroke:#CA6F1E,color:white,font-weight:bold,font-size:20px
    classDef cadlifStyle fill:#C0392B,stroke:#922B21,color:white,font-weight:bold,font-size:20px
    classDef classStyle fill:#2C3E50,stroke:#1B2631,color:white,font-weight:bold,font-size:20px
    classDef noteStyle fill:#F5F5F5,stroke:#999,color:#333,font-style:italic,font-size:20px

    class INPUT inputStyle
    class C1,C2,C3 convStyle
    class FL projStyle
    class DY dynedStyle
    class S1,S2,S3,S4 cadlifStyle
    class CLASS classStyle
    class TS,TET noteStyle