apple / tensorflow_macos

TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Callback on_train_batch_begin/end not called during fit()

zazula opened this issue · comments

on_train_batch_begin() and on_train_batch_end() are not being called on callbacks.

on_batch_begin() and on_batch_end() are being called and are the workaround.

That is, this does not work:
tf.keras.callbacks.LambdaCallback(on_train_batch_end=lambda batch, logs: do_something())

but this does:
tf.keras.callbacks.LambdaCallback(on_batch_end=lambda batch, logs: do_something())

tensorflow: 2.4.0-rc0