Data Science 365

Bring data into actionable insights.

Follow publication

Member-only story

All You Need to Know about Batch Size, Epochs and Training Steps in a Neural Network

Rukshan Pramoditha
Data Science 365
Published in
9 min readAug 26, 2022

--

Photo by Peter F on Unsplash

There might be multiple times you’ve searched Google for batch size, epochs and iterations.

If you’re a beginner in the deep learning field, you will easily get confused with these technical terms. This is because you still do not know the connection between them.

In the context of deep learning, batch size, epochs and training steps are called model hyperparameters that we need to configure manually. In addition to that, these are common hyperparameters that almost every neural network model has.

It is very important to know the exact meanings of these hyperparameters because we need to configure their values manually during the training process in the fit() method as follows.

In the above code block,

  • The batch_size refers to batch size.
  • The epochs refers to the number of epochs.
  • The steps_per_epoch refers to training steps in one epoch.

In addition, shuffle is also a hyperparameter (more on this shortly).

--

--

Data Science 365
Data Science 365
Rukshan Pramoditha
Rukshan Pramoditha

Written by Rukshan Pramoditha

3,000,000+ Views | BSc in Stats (University of Colombo, Sri Lanka) | Top 50 Data Science, AI/ML Technical Writer on Medium

Responses (2)

Write a response