You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "train.py", line 96, in
training_model.fit_generator(train_generator, steps_per_epoch=int(train_generator.nb_samples / train_generator.batch_size), epochs=cfg.nb_epochs, verbose=1, workers=cfg.nb_workers, use_multiprocessing=True, callbacks=callbacks)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training.py", line 1732, in fit_generator
initial_epoch=initial_epoch)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training_generator.py", line 100, in fit_generator
callbacks.set_model(callback_model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/callbacks.py", line 68, in set_model
callback.set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py", line 116, in set_model
super(TensorBoard, self).set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/tensorflow_core/python/keras/callbacks.py", line 1532, in set_model
self.log_dir, self.model._get_distribution_strategy()) # pylint: disable=protected-access
AttributeError: 'Model' object has no attribute '_get_distribution_strategy'
The text was updated successfully, but these errors were encountered:
It seems to be a compatibility issue between TF and Keras. Are you using TF v2? I only used this code in TF v1 so it doesn't include any features that are only in TF v2. You can either try it in TF v1 or if you want to use TF v2, you could try to change keras imports so that it imports tensorflow.keras instead. I found this issue with the same error message. googlecolab/colabtools#925
@Zepharchit by now you might have resolved possibly.
but you may give it a try https://github.com/googlecolab/colabtools/issues/925#issuecomment-633889012
Traceback (most recent call last):
File "train.py", line 96, in
training_model.fit_generator(train_generator, steps_per_epoch=int(train_generator.nb_samples / train_generator.batch_size), epochs=cfg.nb_epochs, verbose=1, workers=cfg.nb_workers, use_multiprocessing=True, callbacks=callbacks)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training.py", line 1732, in fit_generator
initial_epoch=initial_epoch)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/engine/training_generator.py", line 100, in fit_generator
callbacks.set_model(callback_model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/callbacks.py", line 68, in set_model
callback.set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py", line 116, in set_model
super(TensorBoard, self).set_model(model)
File "/home/eleven/ocr_keras/lib/python3.6/site-packages/tensorflow_core/python/keras/callbacks.py", line 1532, in set_model
self.log_dir, self.model._get_distribution_strategy()) # pylint: disable=protected-access
AttributeError: 'Model' object has no attribute '_get_distribution_strategy'
The text was updated successfully, but these errors were encountered: