Views
No views yet
Temporal conv -> GRAPH conv -> Separable conv -> Avg-pool + flatten -> flat vector
(Layer 1) (Layer 2) (Layer 3) (Layer 4) OUTPUT
IDENTICAL THE SWAP IDENTICAL IDENTICALmodel.flat_dim (186 with the defaults: F1=3, F2=6).H =  X W, where  is the symmetric-normalised adjacency of the electrode montage.
Each electrode aggregates only from its physical neighbours (e.g. C3 from
FC3, FC1, C5, C1, CP3, CP1), then a learned per-node readout collapses the electrodes to
the same (F2, 1, T) shape the depthwise conv produced — so Layers 1/3/4 are unchanged.
A spatial="depthwise" flag restores the original EEGNet for a controlled comparison.from_pretrained restores the exact
graph you trained on.PyTorchModelHubMixin module, so you need its class definition
(eegnet_gnn.py, included in this repo) alongside the weights.1from eegnet_gnn import EEGNetGNN
2import torch
3
4model = EEGNetGNN.from_pretrained("shemalfoy/eegnet-gnn-features").eval()
5
6x = torch.randn(1, 1, 22, 1000) # (batch, 1, channels, time)
7features = model(x) # (1, model.flat_dim) == (1, 186)
8
9# attach your own classifier
10head = torch.nn.Linear(model.flat_dim, 4)
11logits = head(features)1import importlib.util
2from huggingface_hub import hf_hub_download
3path = hf_hub_download("shemalfoy/eegnet-gnn-features", "eegnet_gnn.py")
4spec = importlib.util.spec_from_file_location("eegnet_gnn", path)
5mod = importlib.util.module_from_spec(spec); spec.loader.exec_module(mod)
6model = mod.EEGNetGNN.from_pretrained("shemalfoy/eegnet-gnn-features")(batch, 1, 22, T) float tensor — 22 EEG channels in BCI IV-2a order, T samples.(batch, flat_dim) feature vector (flat_dim = 186 with defaults: F1=3, F2=6).torch, huggingface_hub, safetensors. No quantum / PennyLane dependency.build_adjacency(coords=...))
and retraining.