XOR Classification
The "hello world" of neural networks โ solving the XOR problem, which a single linear layer cannot do.
Binary Classification
Classifying data into one of two categories using a neural network with sigmoid output.
Multi-Class Classification
Classifying data into more than two categories using softmax output and cross-entropy loss.
Regression with Neural Networks
Using a multi-layer network for non-linear regression โ fitting a curve, not just a line.
MNIST Digit Classification
Training a neural network to recognize handwritten digits from the MNIST dataset.
Gradient Checking
Verifying that your autodiff gradients are correct using finite difference approximation.
Inspecting Gradients
After calling backward(), inspect a model's parameter gradients to understand what the loss is sending through the network or to diagnose a training problem.
Visualize a Computation Graph
LeanPass can describe the computation graph that produces a tensor. Use visualize() for a plain-text listing or visualize_dot() to generate Graphviz DOT that can be rendered as an image.
Custom Layers
Extending LeanPass with your own layer types by subclassing Module.