PyTorch
Deep learning from tensors to fine-tuning. You practise the maths in NumPy and the API in quizzes. 16 modules of 10 minutes each, with questions that check your answers in the browser.
Foundations
- 1. Tensors: creation and basicsFreeMeet the tensor, PyTorch's array, create tensors in the common ways, and read their shape and dtype, with NumPy practice that runs right here.
- 2. Tensor operations and broadcastingFreeDo element-wise maths, matrix multiplication and reductions along dimensions on tensors, with the same broadcasting rules as NumPy and a few PyTorch-specific habits.
- 3. NumPy ↔ tensors; devices (CPU/GPU)FreeMove data between NumPy, pandas and PyTorch without surprises, understand shared memory, and put tensors and models on the right device.
- 4. Autograd: how gradients workFreeSee how PyTorch records operations and computes gradients with backward(), why gradients accumulate, when to switch tracking off, and check gradients numerically in NumPy.
Intermediate
- 5. Building a model with nn.ModuleFreeDefine networks as nn.Module classes with layers and a forward method, understand what a Linear layer computes, add activations, and count parameters.
- 6. Loss functions and optimizersFreePick the right loss for regression, binary and multi-class problems, understand logits and BCEWithLogitsLoss, and let an optimizer like SGD or Adam update the weights.
- 7. The training loop, step by stepFreeWrite a complete training loop with epochs, mini-batches, a validation pass in eval mode and loss logging, and know what each line is for.
- 8. Datasets and DataLoadersFreeWrap data in a Dataset, let a DataLoader handle batching and shuffling, and write the cleaner training loop that every PyTorch project uses.
Advanced
- 9. A full example: regression from scratchProBuild a complete PyTorch regression project for coffee demand, from data preparation through training, evaluation against baselines, and prediction for new days.
- 10. A full example: classificationProTrain a PyTorch churn classifier end to end with logits and BCEWithLogitsLoss, turn outputs into probabilities, choose a threshold, and evaluate with AUC and a confusion matrix.
- 11. Saving and loading modelsProSave a model's state_dict, write full training checkpoints, load them back correctly, and store the preprocessing and config that predictions depend on.
- 12. Reducing overfitting (dropout, early stopping)ProKeep networks from memorising the training data with weight decay, dropout and early stopping, and see each technique's effect on validation loss.
Expert
- 13. Custom datasets and transformsProWrite Datasets that build examples on demand (sliding windows, files read lazily) and transforms that preprocess or augment each example, keeping training and evaluation behaviour separate.
- 14. Structuring a clean training projectProSplit a training script into config, data, model, engine and entry-point modules, with seeding, command-line options, checkpoints and tests, so experiments are reproducible and easy to change.
- 15. Fine-tuning a pretrained modelProReuse a network trained on a large task for a small one by freezing its body, replacing its head, and optionally fine-tuning all layers with a small learning rate.
- 16. Debugging training (common pitfalls)ProRecognise and fix the bugs that make training silently fail, including shape broadcasting in the loss, forgotten zero_grad or eval, exploding losses and unscaled inputs, and use the overfit-one-batch check.
Track project
- PyTorch Project: Toko Kita's demand network, by handProThree graded tasks that rebuild what PyTorch does for you, in NumPy. Run a small network forward and measure its loss, train with early stopping that keeps the best weights, and debug a training script that has four classic bugs.
Pro modules unlock with one payment of Rp 149.000, yours to keep.