AI Tip from @karpathy
Description
Automatically generated AI learning skill from curated web and social media sources.
Steps
- Tip: When training neural nets, always start with a tiny dataset (e.g. 10 examples) and overfit it completely before scaling up. This validates your entire pipeline works end-to-end.
- # Test your training loop
- def test_overfit():
- model = YourModel()
- tiny_dataset = get_tiny_dataset(10)
- train(model, tiny_dataset, epochs=1000)
- assert loss < 0.01
Code Examples
# Test your training loop
def test_overfit():
model = YourModel()
tiny_dataset = get_tiny_dataset(10)
train(model, tiny_dataset, epochs=1000)
assert loss < 0.01