question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'TQDMCallback' object has no attribute 'on_train_batch_begin'

See original GitHub issue

I get

AttributeError: 'TQDMCallback' object has no attribute 'on_train_batch_begin'

when trying to use keras-tqdm with LSTM.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
ipazccommented, Jul 30, 2019

This is a simple workaround to use until fixed:

from keras_tqdm import TQDMNotebookCallback

# keras, model definition...
cb = TQDMNotebookCallback()
setattr(cb,'on_train_batch_begin',lambda x,y:None)
setattr(cb,'on_train_batch_end',lambda x,y:None)

model.fit(X_train, Y_train, verbose=0, callbacks=[cb])

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])
2reactions
gsportellicommented, May 1, 2019

This is a simple workaround to use until fixed:

from keras_tqdm import TQDMNotebookCallback

# keras, model definition...
cb = TQDMNotebookCallback()
setattr(cb,'on_train_batch_begin',lambda x,y:None)
setattr(cb,'on_train_batch_end',lambda x,y:None)

model.fit(X_train, Y_train, verbose=0, callbacks=[cb])
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Jupyter Notebook and Keras-TQDM: AttributeError ...
Jupyter Notebook and Keras-TQDM: AttributeError: 'TQDMNotebookCallback' object has no attribute 'on_train_batch_begin'.
Read more >
Why am I getting AttributeError: Object has no attribute?
PYTHON : Why am I getting AttributeError : Object has no attribute ? [ Gift : Animated Search Engine ...
Read more >
'module' object has no attribute in 3minutes - YouTube
" AttributeError : object has no attribute "Understand how to trouble shoot the error message. Examples used in the video:When you append a ......
Read more >
Object has no attribute 'object' : r/django - Reddit
AttributeError at /recipebook/addrecipe 'addrecipe' object has no attribute 'object' ... The FormView class based view has no object.
Read more >
jupyter notebook and keras-tqdm: attributeerror ... - splunktool
AttributeError : 'TQDMCallback' object has no attribute 'on_train_batch_begin'. import time import sys import tensorflow as tf import math class ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found