-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'TQDMCallback' object has no attribute 'on_train_batch_begin' #31
Comments
Getting that too. Any luck? |
Nope, no luck. |
It seems that the library is just outdated. Even when I tried to fix it, it doesn't seem to work. I will look for an updated solution for the problem that got me here. |
Solved-ish by creating a progress bar callback, tho I'd love to get an actual fix..
Example Usage:
Unfortunately, it seems that Keras removed the callback argument from the evaluate function, so this works only for training. |
Thanks, very kind of you to share! |
Dude, I dunno if you're still into that, but the solution is very stupid. Keras decides if it allows updating the progress bar by checking a function named sys.stdout.isatty() which is false in PyCharm (I hope you are using PyCharm, that's how I got the error), so all I had to do is to go into \Lib\site-packages\keras\utils and add |
No, I'm actually using Jupyter Notebook. Maybe this could help. Thanks a lot! |
This is a simple workaround to use until fixed:
|
I also went through the same problem, @gsportelli 's method can temporarily help, thanks! |
This temporal fix does not update the widget for me. A workaround is: from keras_tqdm import TQDMNotebookCallback
cb = TQDMNotebookCallback()
cb.on_train_batch_begin = cb.on_batch_begin
cb.on_train_batch_end = cb.on_batch_end
model.fit(X_train, Y_train, verbose=0, callbacks=[cb]) |
Note that for more modern versions of Tensorflow, you may be forced to patch more attributes. I needed to do this, when using Tensorflow 1.14 with
|
I get
when trying to use keras-tqdm with LSTM.
The text was updated successfully, but these errors were encountered: