bstriner / keras-tqdm

Keras integration with TQDM progress bars
MIT License
348 stars 41 forks source link

precision of display #9

Closed jingzhehu closed 7 years ago

jingzhehu commented 7 years ago

@bstriner Really love your elegant package.

Would you please let me know if it's possible to customize the precision of display for the "loss" ? Currently, it defaults to 3 digits after the decimal point but I would like to have around 6 digits or using scientific notations.

Thanks in advance !

bstriner commented 7 years ago

The parameter metric_format defaults to "{name}: {value:0.3f}". This is a standard python string format you can look up the details elsewhere. Something like TQDMCallback(metric_format="{name}: {value:0.6f}" is probably what you're looking for. Scientific notation would be {value:e}. More details here:

https://docs.python.org/2/library/string.html

Cheers

jingzhehu commented 7 years ago

Thanks ! This is exactly what I'm looking for.

bstriner commented 7 years ago

No problem. Added a line along those lines to the readme.