Loading page content…
Loading page content…
Learning Hub · Deep learning
Move from tensor operations to training and evaluating neural networks in PyTorch. Finish with a small, well-documented model and a clear evaluation.
Prerequisites: Python, NumPy, and basic machine learning concepts.
Build intuition for tensor shapes, gradients, datasets, and the training loop before scaling up.
Create tensors with clear shapes, move them between CPU and accelerator when available, and use autograd to see how gradients are computed.
Create a small dataset and a two-layer network, define a loss function and optimizer, and track training and validation loss over time.
Build a complete mini-batch training loop with forward passes, loss calculation, zero_grad, backpropagation, optimizer updates, and metric logging. Run it on CPU and an accelerator when available, track epoch-level validation metrics, and explain how the loop controls learning.
Use validation data to guide improvements, evaluate on held-out examples, and present what worked and where the model fails.
Track train and validation loss, apply early stopping, and save the best checkpoint. Adjust learning rate or regularization based on validation curves.
Evaluate held-out examples with appropriate metrics, inspect a confusion matrix, and explain limitations such as small data or class imbalance.
Add weight decay, dropout, and a learning-rate schedule to a working PyTorch model. Compare one change at a time on validation data, log the results, and explain how each intervention affects overfitting and training stability.
Complete a small neural-network project from data preparation to a documented evaluation, and make its training and limitations easy to reproduce.
Select a suitable dataset, inspect class balance and data quality, and implement a Dataset and DataLoader. Build deterministic transforms and document the batch shapes, label mapping, and train-validation-test split before training.
Implement the training and validation loops, track losses and task metrics, and debug unstable gradients or shape errors. Tune a few architecture or optimizer choices with validation data while keeping test examples untouched.
Evaluate the final model on held-out data, inspect incorrect predictions, and create clear plots for the key metrics. Record the model configuration, data split, and reproducible training settings, then summarize strengths, limitations, and next steps.