A Lightweight Neural Network Framework (NumPy-Based)
Nets is a from-scratch deep learning framework built using NumPy, designed to be educational, modular, and extensible, while also supporting real-world experimentation workflows such as training, evaluation, and visualization.
• 🧠 Custom autograd engine (Tensor-based)
• ⚙️ Modular neural network API (like PyTorch)
• 📦 Layers: Linear, RNN, (Conv2D in progress)
• ⚡ Optimizers: SGD, Adam
• 📉 Losses: MSE, CrossEntropy
• 📊 Advanced Dashboard (W&B-like)
• 🧪 Experiment tracking system
• 📁 Save / Load run logs
• 🎯 Supports MLP, RNN, and basic CNN workflows
• Wraps NumPy arrays
• Supports automatic differentiation
• Builds computational graph dynamically
from nets.tensor.tensor import Tensor x = Tensor([1,2,3], requires_grad=True)
from nets.nn import Sequential, Linear, ReLU
model = Sequential( Linear(784, 256), ReLU(), Linear(256, 10) )
from nets.optim.adam import Adam from nets.losses.cross_entropy import cross_entropy
optimizer = Adam(model.parameters(), lr=0.001)
logits = model(x) loss = cross_entropy(logits, y)
loss.backward() optimizer.step() optimizer.zero_grad()
NETS includes a real-time experiment dashboard powered by Dash + Plotly.
Features: • 📈 Live Loss & Accuracy plots • 📊 Precision / Recall / F1 (auto-detected) • 🔥 Confusion Matrix • 🔁 Run comparison • 🧾 Experiment metadata • 🗑 Run deletion • 🎯 Task-aware visualization
from nets.visualization.dashboard import Dashboard Dashboard(logger).run()
Classification • Accuracy • Precision • Recall • F1 Score • Confusion Matrix
Regression (planned) • MAE • RMSE • R²
⸻
Autograd Engine • Reverse-mode differentiation • Dynamic graph construction • Supports broadcasting
Layers • Linear • ReLU / Sigmoid / Tanh • RNN • Conv2D (in progress)
Optimizers • SGD (with momentum) • Adam
Data • Dataset abstraction • DataLoader (mini-batch support)
Visualization • Real-time metrics • Interactive plots • Task-aware rendering
⸻
• No GPU acceleration (NumPy backend only)
• Conv2D still being optimized
• No Transformer yet
• Limited NLP support (no embeddings)
⸻
• 🔥 Transformer (Encoder + Decoder)
• ⚡ GPU support (CuPy backend)
• 📦 Model saving / loading
• 🧠 Automatic Trainer (Lightning-like)
• 🌐 Deployment utilities
⸻
Feel free to fork and improve: • Add layers (Conv, Attention) • Improve performance • Enhance dashboard UI
⸻
Below are real snapshots of the NETS Dashboard during training:
These demonstrate: • Real-time metric tracking • Adaptive visualization (task-aware) • Clean UI with multiple metric panels
⸻
NETS demonstrates that:
You can build a functional deep learning framework from scratch, understand every component deeply, and still run meaningful experiments.
⸻
⭐ If you like this project
Give it a star ⭐ and share it!

