3. Training & Optimization
Epochs and Batches (பயிற்சி சுற்றுகள் / Training Rounds)
Let's study for TNPSC exams! (டி.என்.பி.எஸ்.சி எக்ஸாம்க்கு படிப்போமா!)
Technical Meaning: சுழற்சிகள் மற்றும் தொகுதிகள் (Suzharchigal & Thoguthigal) - The number of times the AI sees the entire dataset.
The Core Idea
When training an AI, you usually have a massive dataset (like 1 million images). An Epoch is one complete pass through the entire dataset. Because passing 1 million images at once would crash a computer's memory, we split the data into smaller chunks called Batches.
The Origin Story
In the early days, datasets were small enough to process all at once (Batch Gradient Descent). But as Big Data exploded, it became impossible to fit everything into RAM. The solution was Stochastic or Mini-Batch training. The AI looks at a small batch (e.g., 32 images), updates its weights, looks at the next 32, updates again, until it finishes all 1 million (One Epoch). Then it usually repeats the Epoch multiple times to fully memorize the patterns.
The Tamil Analogy
Think about studying for the massive TNPSC Group 1 Exams.
You have a massive 1,000-page history textbook (The Dataset).
- If you try to read all 1,000 pages in one single night, your brain will crash (Out of Memory Error).
- Instead, you divide the book into 50-page chapters. Each chapter is a Batch. You read a batch, test your knowledge (update weights), and move to the next batch.
- Once you finish reading the entire 1,000-page book from cover to cover, you have completed One Epoch.
Since you won't remember everything after just one read, you usually read the entire book again and again (10 Epochs) until you are perfectly prepared for the exam!
Try It Yourself
Epochs & Batches
1 Epoch = Reading all 100 chapters. Watch how Batch Size changes learning!