Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk3 min

AI Training Passes: What an Epoch Counts

An epoch is one traversal of the training dataset. Batch size determines how many iterations or training steps typically make up that pass.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

An AI training pass—usually called an epoch—is one traversal of the training dataset, with each training example processed once. An epoch is not usually one update: training data is typically split into batches, and each batch produces an iteration or training step.

What does one training pass mean?

One epoch means the model has processed every example in its training set once. Google’s Machine Learning Glossary defines an epoch as “a full training pass over the entire training set such that each example has been processed once.” The term describes coverage of the dataset, not a particular amount of elapsed time or a guaranteed improvement in model quality.

As an Amazon Associate I earn from qualifying purchases.

In ordinary minibatch training, the dataset is divided into groups. The model processes each group in turn, so several batch-level iterations or updates usually occur within one epoch.

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

How many steps are in one epoch?

The number depends on the number of training examples and the batch size. When the examples divide evenly into batches, the calculation is:

iterations per epoch = number of training examples ÷ batch size

  • Google’s glossary uses 1,000 examples and a batch size of 50: one epoch takes 20 iterations.
  • Google’s Machine Learning Crash Course uses 1,000 examples and mini-batches of 100: one epoch takes 10 iterations.

These are arithmetic examples, not measured performance results. If the dataset size is not divisible by the batch size, the last batch may be smaller, or a training setup may drop it. The exact step count therefore depends on how the framework or training loop handles the remainder.

Rank #2
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

Is an epoch the same as a step?

No. An epoch counts a pass through the training data; a step or iteration commonly counts work on one batch. In a standard minibatch loop, the number of steps in an epoch is roughly the number of batches needed to cover the dataset.

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

A step often includes calculating the model’s loss, computing gradients, and updating its weights. Hugging Face describes those operations in its Trainer documentation for Transformers v4.52.3. Logging and step-count conventions can vary with framework and configuration, so check the training tool’s definition when interpreting a reported count.

What happens inside a training pass?

For each batch, a typical training loop first runs a forward pass: the model uses the inputs to produce predictions. It then compares predictions with the target values to calculate loss. During the backward pass, it calculates gradients, which indicate how the weights contributed to the error, and the optimizer uses those gradients to update the weights.

PyTorch’s introductory tutorial describes training across multiple epochs as multiple passes over the dataset. Its optimization tutorial explains batch processing and parameter updates. A forward or backward pass is a computation on inputs; neither term means a complete traversal of the training dataset.

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

Why set the number of epochs?

The configured epoch count tells the training process how many dataset traversals to make, but more epochs do not automatically mean a better model. Epoch count is a hyperparameter that may need experimentation for the task and training setup. Google’s guidance on choosing training steps notes that duration and step decisions depend on workload characteristics and factors such as batch size, data augmentation, and regularization.

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

Also distinguish training from validation: the epoch convention refers to coverage of the training data. A validation evaluation may happen at the end of an epoch or on another schedule; it is not itself another training pass.

When the ordinary definition needs qualification

The simple definition assumes a training run that traverses a known dataset. Sampling, streaming data, custom loops, or dropping a final partial batch can change how much data a reported epoch actually processes. In those setups, consult the framework or run configuration rather than assuming every example was used exactly once.

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.