Neural Network Basics interview question

Deep LearningNeural Network Basicsbasic

In neural network training, what is an epoch?

  1. AOne update of the network's weights, computed from the gradient of a single mini-batch of training examples.
  2. BThe number of training examples processed together before the network's weights are updated once.
  3. COne complete pass of the training algorithm through every example in the entire training dataset.
  4. DOne forward pass over the whole validation set, used to measure generalization after the weights change.
Show the answer and explanation

Correct answer: C, One complete pass of the training algorithm through every example in the entire training dataset.

Explanation Neural Network Basics

An epoch is one full pass over the entire training set: every training example has been used once to compute gradients. Training usually runs for many epochs, and the data is typically reshuffled between them.

The three terms are easy to mix up:

termmeaning
batch sizenumber of examples used for one gradient update
iteration (step)one weight update from one batch
epochone pass over all training examples

Why the other answers are wrong: a single update from one mini-batch is an iteration; the number of examples per update is the batch size; and evaluating on the validation set is a separate check, often done once per epoch, but it is not what defines an epoch.

Interview tip: link the terms with iterations per epoch ≈ N / batch size, and mention that early stopping is usually decided per epoch from the validation metric.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Deep Learning questions

  1. What is the ReLU activation, and why is it a popular default for hidden layers?
  2. In neural network training, what is backpropagation?
  3. What does dropout do while a neural network is being trained?
  4. What does a 2-D convolutional layer compute at each output position?
  5. In a vanilla recurrent neural network, what is the hidden state?