function updateTrainingPlotConcreteClassification(batchLine,iteration,loss,start,epoch)
% updateTrainingPlotConcreteClassification - Plot the loss at each iteration.

%   Copyright 2021 The MathWorks, Inc.

% Control the frequency of update to plots
miniBatchLossFrequency = 5;

if ~mod(iteration,miniBatchLossFrequency) || iteration == 1
    lossVal = double(gather(extractdata(loss)));
    addpoints(batchLine,iteration,lossVal);
    D = duration(0,0,toc(start),"Format","hh:mm:ss");
    title("Epoch" + epoch + ", Elapsed: " + string(D));
    drawnow limitrate
end

end