foortex.codegen utility
PythonNeurotech 1980 16.7k

PyTorch EEGNet Neural Network for BCI Signal Decoding

State-of-the-art EEGNet deep learning model implemented in PyTorch. Uses depthwise and separable convolutions for EEG signal classification across P300, Motor Imagery, and ERN tasks.

Spatial depthwise convolutions
Zero-padding temporal filtering
Interactive Prompt & Options
Fully Editable

Appended directly to the LLM system prompt for tailored code output.

✨ OpenRouter LLM Engine (Llama-3.3-70B) Active

Generated Code

⚡ Instant Boilerplate
python-pytorch-bci-eegnet.py
1import torch
2import torch.nn as nn
3
4class EEGNet(nn.Module):
5 def __init__(self, channels=8, samples=250, num_classes=2):
6 super().__init__()
7 self.conv1 = nn.Conv2d(1, 8, (1, 64), padding=(0, 32), bias=False)
8 self.depthwise = nn.Conv2d(8, 16, (channels, 1), groups=8, bias=False)
9 self.classifier = nn.Linear(16 * (samples // 8), num_classes)
10
11 def forward(self, x):
12 return x
13
13 lines • 428 bytespython
Automated Sandbox

Deploy this boilerplate automatically in 1 click.

Deploy