How to Trust Your Deep Learning Code
summary
Shows concrete checks: use Python's unittest (or pytest) with PyTorch to assert model output shapes, verify pixel scaling to [-1,1], and run dataset-only scans or sampled checks. Test data loader multiprocessing because an lru_cache on file reads can crash multiworker loading. Disable gradients with torch.no_grad for fast forwards, seed torch/numpy/random for determinism, ensure GPU tensors are created on the correct device (rand vs device-aware tensors), verify per-sample independence, parameter updates, KL loss against scipy KL divergence, and add CI via GitHub Actions.
AI-written summary · about
chapters (9)
- 0:00Intro
- 1:50Overview
- 4:50What are good tests
- 5:40Data testing
- 13:10Data sets
- 15:00Testing your model
- 22:30Unit tests
- 25:38Continuous Integration
- 26:07Questions
related talks
30mHow to Properly Test ML Models & Data
19mBuilding Trust for Users and Regulators Alike: A Cost-Efficient PyTorch Pat...
27mControlling the Chaos: Reproducible Deep Learning Experiments Using Lightning and Hydra
01h 26mDeep Neural Networks with PyTorch
01h 05mDeep Learning with PyTorch
41mReally Deep Neural Networks with PyTorch
24mTesting Techniques for Critical Deep Learning Applications
50mDesigning tests for ML libraries
