October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

What Is an Epoch in Machine Learning?

An epoch is generally one pass through a machine-learning training set—not one parameter update. See how batches, iterations and training methods relate.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A machine-learning epoch is one pass through the training data: in the standard fixed-dataset case, every training example is processed once. An epoch may contain many batches and training updates; it is not a single update.

Epoch, batch and iteration: what each term means

These terms describe different levels of a training process:

  • Epoch: A full pass over the training set, so each example is processed once under the standard definition. Google’s Machine Learning Glossary defines it as “A full training pass over the entire training set such that each example has been processed once.”
  • Batch: A group of examples processed together during training.
  • Iteration (or step): One training update. In mini-batch training, the model processes a batch and typically updates its parameters once. A neural-network iteration involves a forward pass followed by a backward pass.

So an epoch is a pass through the data, while an iteration is an update made using a batch—or, in other training approaches, a different amount of data.

How many iterations are in one epoch?

For a fixed dataset of N examples and batch size B, the number of iterations is commonly about N/B. The precise count depends on what the training implementation does with a final incomplete batch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
  • Use scikit-learn to track an example ML project end to end
  • Explore several models, including support vector machines, decision trees, random forests, and ensemble methods
  • Exploit unsupervised learning techniques such as dimensionality reduction, clustering, and anomaly detection
  • Dive into neural net architectures, including convolutional nets, recurrent nets, generative adversarial networks, autoencoders, diffusion models, and transformers
  • Use TensorFlow and Keras to build and train neural nets for computer vision, natural language processing, generative models, and deep reinforcement learning

For example, Google’s documentation works through a dataset of 1,000 examples:

Training setup Examples per batch Iterations in one epoch
Mini-batch example 50 20
Mini-batch example 100 10

These are illustrative calculations, not performance measurements. With the same dataset, a smaller batch means more iterations per epoch; a larger batch means fewer. It does not follow that the two setups learn equally well.

Why update counts differ by training method

Google’s worked example shows how the amount of data used for each update changes the number of updates in an epoch:

  • Full-batch training: Uses the full dataset for one update, so it updates once per epoch.
  • Stochastic gradient descent: Uses one example per update, so it updates once per example.
  • Mini-batch SGD: Uses a batch per update, so it updates once per batch.

That is why “one epoch” and “one update” are not interchangeable: the update count depends on the training method and batch size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does every epoch visit every example exactly once?

That is the standard definition for a fixed training set, but the word can describe a practical training phase rather than a literal, guaranteed traversal in every setup. Keras describes an epoch as an “arbitrary cutoff,” generally one pass through the dataset, used to divide training into phases for logging and periodic evaluation.

For streaming or dynamically sampled data, repeated examples, or an input pipeline limited to a custom number of steps, an epoch may not mean that every distinct example was visited exactly once. Interpret it according to the framework’s convention and how that training loop supplies data. The term concerns training data; validation or test evaluation is separate.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What does the number of epochs tell you?

Training commonly reuses the training set over multiple epochs. More epochs take more training time and can improve a model, but there is no universally correct count: the appropriate amount depends on the task and should be determined through experimentation. Increasing epochs does not guarantee better results.

When comparing training runs, epoch counts alone can be misleading if the batch sizes or data-sampling rules differ. Compare the batch size, updates per epoch, total examples processed, training time and validation results to understand what each run did and how it performed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.