function onIterationEnd(iterationCount, totalIterations) {
  trainStatus.textContent = `Iteration ${iterationCount} of ${totalIterations}`;
  trainProgress.value = iterationCount / totalIterations * 100;
}
A function invoked at the end of a training iteration.

@param {number} iterationCount A count of how many iterations has completed
  so far in the current round of training.
@param {*} totalIterations Total number of iterations to complete in the
  current round of training.