I'm trying to output to the terminal the same type of training progress bar that is done with Keras training. I'm new to tensorflow and have not yet tried Keras, but I'm interested in knowing if it can be done without Keras.
import tensorflow as tf
train_data = (...)
progbar = tf.keras.utils.Progbar(len(train_data))
for i, d in enumerate(train_data):
(train model here...)
progbar.update(i) # This will update the progress bar graph.
3714/3715 [============================>.] - ETA: 20s
tf.keras.utils.Progbar()
instead of importing tqdm
.tf.print()
, instead of python native print function.Maybe I don't fully understand your training progress bar
's meaning:
But I think you can try a python package:tqdm
, put it into your training loop
:
from tqdm import tqdm
for i in tqdm(range(10000)):
...
then you will get something like that:
100%|██████████| 10000/10000 [00:00<00:00, 1383300.02it/s]
There is tqdm
's doc. https://tqdm.github.io/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With