graph LR;
%% === 1. DEFINE ALL NODES ===
classDef stage fill:#f8f9fa,stroke:#333,stroke-width:2px,stroke-dasharray: 3;
classDef io fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef invisible fill:none,stroke:none,width:0,height:0;
Input["Input Tensor <br/> (Batch, Seq_Len, 17, 3)"];
Output(("Output Logit <br/> (Batch, 1)"));
%% === 2. GROUP NODES INTO STAGES ===
subgraph id1["Stage 1: Input Processing"]
direction TB
S1_A["Flatten Keypoints <br/> (Batch, Seq_Len, 51)"];
S1_B["Linear Embedding <br/> (51 -> d_model)"];
S1_A --> S1_B;
end
subgraph id2["Stage 2: Temporal Feature Extraction"]
direction TB
padding[ ]:::invisible
S2_A["Add Positional Encoding"];
S2_B["N x Transformer Encoder Layers <br/> (Multi-Head Self-Attention)"];
S2_C["Mean Pooling over Sequence <br/> (Temporal Aggregation)"];
padding --> S2_A[.];
S2_A --> S2_B --> S2_C;
end
subgraph id3["Stage 3: Classification Head"]
direction TB
S3_A["MLP Classifier <br/> (Linear -> ReLU -> Linear)"];
end
%% === 3. DEFINE STAGE-TO-STAGE CONNECTIONS ===
Input --> id1;
id1 --> id2;
id2 --> id3;
id3 --> Output;
%% === 4. APPLY STYLES ===
class Input,Output io;
class S1_A,S1_B,S2_A,S2_B,S2_C,S3_A stage;