How is the progress bar shown when fitting a model and when evaluating its performance? I know how to make it visible, but what is it based on?
I made a simple Sequential
model with a few layers, compiled and started to train:
# x.shape: (3270, n)
# y.shape: (3270, 1)
model.fit(x, y, epochs=20, batch_size=300)
If I've read the documentation right, this is what ought to happen internally: the data is iterated through such that an optimisation step considers only the batch-size-amount of data, for every batch until the data set is exhausted. Then begins the next epoch.
For the large batch sizes the progress bar of epochs remains fixed, seems like it's the size of the batch to the whole training data:
300/3270 [=>............................] - ETA: 0s - loss: 0.4178 - acc: 0.8433
3270/3270 [==============================] - 0s 9us/step - loss: 0.3813 - acc: 0.8593
Epoch 17/20
But for smaller sizes there appears to be more and a varying amount of bars and they actually display some movement.
30/3270 [..............................] - ETA: 0s - loss: 0.5154 - acc: 0.8333
1770/3270 [===============>..............] - ETA: 0s - loss: 0.3560 - acc: 0.8621
3270/3270 [==============================] - 0s 29us/step - loss: 0.3631 - acc: 0.8618
Epoch 19/20
30/3270 [..............................] - ETA: 0s - loss: 0.3360 - acc: 0.8667
1620/3270 [=============>................] - ETA: 0s - loss: 0.3473 - acc: 0.8667
3120/3270 [===========================>..] - ETA: 0s - loss: 0.3599 - acc: 0.8622
3270/3270 [==============================] - 0s 33us/step - loss: 0.3592 - acc: 0.8621
Epoch 20/20
I didn't find information on exactly what are these bars showing. So I'd appreciate any insight.
As stated in the comments: The progress bar shows the progress of each epoch and is designed to update in-line till the end of epoch. Normally then, the progress bar is full and a new progress bar is started for the next epoch.
Sometimes, depending in which terminal you start your program, the progress bar will start a new line. A good example is Pycharm where you can run your python script in terminal or in the run tab which are both at the bottom of the program. Here the progress bar will behave differently but normally the terminal tab show the normal and desired behaviour.