I have built a model using the functional API from Keras, and when I am adding the tensorboard instance to my callbacks in my model.fit() function, it throws an Error: "AttributeError: 'Model' object has no attribute 'run_eagerly'"
The Model class does indeed not have an attribute run_eagerly, but in the Keras doc, it says that it can be passed as parameter to the model.compile() function. This returns
"ValueError: ('Some keys in session_kwargs are not supported at this time: %s', dict_keys(['run_eagerly']))"
Does this mean I don't have a suitable version of Tensorflow/Keras?
Tensorflow: 1.14.0
Keras: 2.2.4-tf
model = Model(inputs=[input_ant1, input_ant2], outputs=main_output)
tensorboard = TensorBoard(log_dir='.logs/'.format(time()))
[...]
model.fit([input1, input2],[labels], epochs=10, callbacks=[tensorboard])
I got the same error : AttributeError: 'Model' object has no attribute 'run_eagerly'
After two minor changes my tensorboard is running now.
make sure you import tensorboard as follows:
from keras.callbacks import TensorBoard
change the log dir like this:
tensorboard = TensorBoard(log_dir="logs")
I got same error message when I use:
from tensorflow.keras.callbacks import ModelCheckpoint
I fix it with by importing the same as:
from keras.callbacks.callbacks import ModelCheckpoint
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With