Simple answer to simple question about tensorflow print output

Hello. When using fit, tf prints progress of testing epochs. It is progressing arrow and value loss. What is interesting is that it prints on same line in terminal even if terminal window is shorter than line, so the line wraps. Yet tf is able to refresh values that are not on last line, but last two or more lines.

How is that achieved please? I have not found any method how to return start of print one or two lines above. Where is the code for that on github?

Thank you very much, Jan

Hi @Jan_Benes_III ,

The Print function is used by the tf.keras.callbacks.ProgbarLogger class to print progress information during training. The ProgbarLogger class uses the smart line wrapping technique to ensure that the progress information is always visible, even if the terminal window is resized.

Here is the github code for ProgbarLogger class implementation

I hope this helps!

Thanks.