Per google's glossary, an iteration refers to
A single update of a model's weights during training ...
The following code comes from a github repo
def fit(self, x, y, verbose=False, seed=None):
indices = np.arange(len(x))
for i in range(self.n_epoch):
n_iter = 0
np.random.seed(seed)
np.random.shuffle(indices)
for idx in indices:
if(self.predict(x[idx])!=y[idx]):
self.update_weights(x[idx], y[idx], verbose)
else:
n_iter += 1
if(n_iter==len(x)):
print('model gets 100% train accuracy after {} epoch(s)'.format(i))
break
Note that this model doesn't update weights for each single example, because when the model make a correct prediction for some example, it skips the example without updating weights.
In this kind of scenario where model makes a correct prediction for $i$th input $x_i$ and jump into next example $x_{i+1}$ without updating weights for $x_i$, does it count as an iteration?
Assume there are 120 training examples, in one epoch, the model makes 20 correct prediction and updates weight for the other 100. Should I count this epoch 100 iterations or 120 iterations?
Note: This question is NOT about coding. The code cited above works well. This question is about terminology. The code is just to illustrate the scenario in question.