I am new to python. How to dynamically save the output from the fit() provided by keras to a text file ?
suppose the output is
Epoch 1/30
904/904 [==============================] - 488s - loss: 0.5103 - acc: 0.7505 - val_loss: 0.3322 - val_acc: 0.8669
For the first epoch, I want to write this into a text file immediately. Then I want to append the next output:
Epoch 2/30
904/904 [==============================] - 471s - loss: 0.3982 - acc: 0.8190 - val_loss: 0.2841 - val_acc: 0.8869
To the same text file and so on. That is, I want to dynamically update the file every time. How do I do it? is it possible to use the capture magic for this?