π§ A transparent, debuggable deep learning framework
PyTorch-compatible implementation with full visibility into internals
# What's actually happening here? π€·ββοΈ
loss.backward() # Magic?
optimizer.step() # More magic?You're not alone. Most ML students and engineers use deep learning frameworks without understanding the internals. That's where TensorWeaver comes in.
TensorWeaver is a transparent deep learning framework that reveals exactly how PyTorch works under the hood. Built from scratch in pure Python, it provides complete visibility into automatic differentiation, neural networks, and optimization algorithms.
Think of it as "PyTorch with full transparency" π§
- ML Engineers debugging complex gradient issues and understanding framework internals
- Researchers who need full control over their implementations
- Software Engineers building custom deep learning solutions
- Technical Teams who need to understand and modify framework behavior
- Developers who refuse to accept "black box" solutions
π‘ Pro Tip: Use
import tensorweaver as torchfor seamless PyTorch compatibility!
pip install tensorweaverimport tensorweaver as torch # PyTorch-compatible API!
# Build a neural network (just like PyTorch!)
class SimpleModel(torch.nn.Module):
def __init__(self):
super().__init__()
self.linear1 = torch.nn.Linear(784, 128)
self.relu = torch.nn.ReLU()
self.linear2 = torch.nn.Linear(128, 10)
def forward(self, x):
x = self.relu(self.linear1(x))
return self.linear2(x)
model = SimpleModel()
# Train it
loss_fn = torch.nn.MSELoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
# The difference? You can see EXACTLY what happens inside! ππ Try it live in your browser β
|
|
| π Production Frameworks | π¬ TensorWeaver |
|---|---|
| β Complex C++ codebase | β Pure Python - fully debuggable |
| β Optimized for speed only | β Optimized for understanding and modification |
| β "Trust us, it works" | β "Here's exactly how it works" |
| β Black box internals | β Complete transparency and control |
- π Transparent Implementation: Every operation is visible, debuggable, and modifiable
- π Pure Python: No hidden C++ complexity - full control over the codebase
- π― PyTorch-Compatible API: Drop-in replacement with complete visibility
- π οΈ Engineering Excellence: Clean architecture designed for understanding and extension
- π§ͺ Complete Functionality: Autodiff, neural networks, optimizers, ONNX export
- π Production Ready: Export trained models to ONNX for deployment
- Tensor Operations - Fundamental tensor mechanics and operations
- Linear Models - Basic neural network implementation
- Automatic Differentiation - Gradient computation engine (coming soon)
- Deep Networks - Multi-layer perceptron and complex architectures
- Optimization Algorithms - Advanced training techniques (coming soon)
- Model Deployment - ONNX export for production systems
- Custom Operators - Framework extension capabilities (coming soon)
- Performance Engineering - Optimization techniques (coming soon)
- Hardware Acceleration - GPU computation support (in development)
π Note: Some documentation links are still in development. Check our milestones for working examples!
π¬ See Automatic Differentiation in Action
import tensorweaver as torch
# Create tensors
x = torch.tensor([2.0])
y = torch.tensor([3.0])
# Forward pass
z = x * y + x**2
print(f"z = {z.data}") # [10.0]
# Backward pass - see the magic!
z.backward()
print(f"dz/dx = {x.grad}") # [7.0] = y + 2*x = 3 + 4
print(f"dz/dy = {y.grad}") # [2.0] = xπ§ Build a Neural Network from Scratch
import tensorweaver as torch
class MLP(torch.nn.Module):
def __init__(self):
super().__init__()
self.fc1 = torch.nn.Linear(784, 128)
self.relu = torch.nn.ReLU()
self.fc2 = torch.nn.Linear(128, 10)
def forward(self, x):
x = self.relu(self.fc1(x))
return self.fc2(x)
# Every operation is transparent!
model = MLP()
print(model) # See the architectureInstead of opaque "black box" frameworks, TensorWeaver provides:
- Full Transparency - Every operation is readable, debuggable Python code
- Complete Control - Modify any component to fit your specific needs
- PyTorch Compatibility - Use existing knowledge and code seamlessly
- Deep Understanding - Know exactly what your model is doing at every step
Join our growing community of engineers who value transparency and control.
# Option 1: Install from PyPI (recommended)
pip install tensorweaver
# Option 2: Install from source (for contributors)
git clone https://github.com/howl-anderson/tensorweaver.git
cd tensorweaver
poetry install- π Browse Examples - Working implementations and demos
- π Try Online - Browser-based environment
- π¬ Community Forum - Technical discussions and support
- π Documentation - Complete API reference (expanding)
TensorWeaver thrives on community contributions! Whether you're:
- π Reporting bugs
- π‘ Suggesting features
- π Improving documentation
- π§ͺ Adding examples
- π§ Writing code
We welcome you! Please open an issue or submit a pull request - contribution guidelines coming soon!
- π Documentation - Framework overview
- π¬ Discussions - Community Q&A
- π Issues - Bug reports and feature requests
- π§ Follow Updates - Star/watch for latest changes
TensorWeaver excels in scenarios requiring deep understanding and control:
- π¬ Research & Development - Implement novel algorithms with full control
- π Debugging Complex Models - Trace gradient flow and identify numerical issues
- ποΈ Custom Implementations - Build specialized layers and operators
- π Production Prototyping - Develop and export models to ONNX for deployment
Need support for your specific use case? Open an issue or join our discussions!
If TensorWeaver helped you debug, understand, or build better models, please consider starring the repository! It helps other engineers discover this transparent framework.
TensorWeaver is MIT licensed. See LICENSE for details.
- Inspired by transparent implementations: Micrograd, TinyFlow, and DeZero
- Thanks to the PyTorch team for the elegant API design
- Grateful to all contributors and the open-source community
Ready for complete transparency in deep learning?
π Explore TensorWeaver at tensorweaver.ai
