Closed zaccharieramzi closed 4 years ago
I don't think it would be hard to do because keras exposes methods for that: e.g. https://www.tensorflow.org/api_docs/python/tf/keras/callbacks/Callback#on_test_batch_begin . Contributions welcome!
@gabrieldemarmiesse , please review PR #38447
As a small note, I believe the TQDM callback should have a cleanup as we removed the "samples" mode and a refactoring would be welcome before a PR to add this feature. There is definitly some dead code/renaming to do.
Yep. Got it. Let me do that too.
@gabrieldemarmiesse , I have created PR for adding methods on_test_batch_begin()
and on_test_batch_end()
. I have also looked at removing unused code related to samples
mode. I have found one clue here. But since, I am not aware about past implementation and changes, I couldn't do on my own. Please give me hints or point me the direction where I can find one.
ops, sorry I have forgot about evaluate() when I wrote it and thanks @ashutosh1919 so much for the contribution!
@zaccharieramzi and @gabrieldemarmiesse , please review PR. Creates as below.
Describe the feature and the current behavior/state.
Right now, the
TQDMProgressBar
callback can only be used when training a model. When evaluating nothing happens. And even if I try to "cheat" by manually setting theon_test_batch_(begin|end)
methods, it fails with an error aboutmode
.Relevant information
Which API type would this fall under (layer, metric, optimizer, etc.) callbacks
Who will benefit with this feature? everyone using
tqdm
to evaluate in a notebook: I want something fancier than the default evaluate progressbarAny other info. It failed in both tf2.2 and tf2.1
You can find the colab gist here.