Moving averaging of Loss during Training in Keras

I am using Keras with TensorFlow to implement a deep neural network. When I plot the loss and number of iterations, there is a significant jump in loss after each epoch. In reality, the loss of each mini-batch should vary from each other, but Keras calculates the moving average of the loss over the mini-batches, that’s why we obtain a smooth curve instead of an arbitrary one. The array of the moving average is reset after each epoch because of which we can observe a jump in the loss.

Python is there a way to align my text along and truncate float at the same time

I’m trying to find out if in the format function if I can convert my float to 2 decimal points and have it align in the one line. In the example below I want to align the last element, i’m wondering if I can do something like print("{0:.2f} {1:<60} {{2:.2f}:<8} {3:.2f}".format(item[0], item[1], item[2], item[3])) I’m aware I can use the round function on the 2nd last element and then align it.