Python progressbar adds its own dynamic information to the progressbar (prevent visuals)
import progressbar
import time
widgets = ['Progress:',
progressbar.Percentage(), ' ',
progressbar.Bar('='),' ',
progressbar.Timer(), ' ',
progressbar.DynamicMessage("training_batch_acc"),
]
bar=progressbar.ProgressBar(widgets=widgets, max_value=1000)
for i in range(1000):
time.sleep(1)
bar.dynamic_messages.training_batch_acc = 10
bar.update(i)
Dynamic information added by training_batch_ACC in the code, variable is set by Widgets, dynamic_messages.training_batch_ACC modify value, which can be displayed dynamically in real time, concise and clear
Read More:
- The lenet model trained by Python failed to predict its own handwritten pictures
- Python: How to Use try exception to Display Abnormal Error Information
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- TensorFlow Install Error: Could not load dynamic library ‘*****.dll‘; dlerror: ********.dll not found
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] Tensorflow cuda Error: Could not load dynamic library ‘libcudart.so.11.0‘; dlerror: libcudart.so.11.0:
- Python: How to Auto Add Watermark to PDF
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- Pychar can’t connect to Python console, but it can run. Py file, and Anaconda’s command line can run Python command
- Ctypes DLL Error: FileNotFoundError: Could not find module ‘***_dll.dll‘ (or one of its dependencies).
- [Solved] ValueError: only one element tensors can be converted to Python scalars
- Python Error: pip install mysql-connector-python failed
- Python raspberry pie starts sending IP address to mailbox
- npm install Error: stack Error: Can’t find Python executable “python”
- Python traverses all files under the specified path and retrieves them according to the time interval
- Linux Fatal Python error: Py_Initialize Unable to get the locale encoding
- [Solved] supervisor Error: /usr/local/lib/python2.7/dist-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
- How to Fix “HTTP error 403: forbidden” in Python 3. X
- Python: How to Disable InsecureRequestWarning error