I am trying to train model in Google Colab using tensorflow 2.x bundle package for Colab and Getting Error as mention Below:
AttributeError:'Model' object has no attribute _get_distribution_strategy'
https://github.com/tensorflow/tensorflow/pull/34870
you can also remove the tensorboard callback for now.
you can also remove the tensorboard callback for now.
Will the training weights be saved if the callback is removed?
Yes they will be. Only thing you lose is the usage of Tensorboard.
ps. you can also use --tensorboard-dir "" on the command line to disable Tensorboard callback.
It is a problem with keras, right? I mean, you cannot solve it in this implementation, right?
It is a problem with
keras, right? I mean, you cannot solve it in this implementation, right?
i solved it by --tensorboard-dir ""
Yes they will be. Only thing you lose is the usage of Tensorboard.
ps. you can also use
--tensorboard-dir ""on the command line to disable Tensorboard callback.
'--tensorboard-dir ""' is not an internal or external command, nor is it a runnable program or batch files.@hgaiser
It is a problem with
keras, right? I mean, you cannot solve it in this implementation, right?
It's a problem with keras and tensorflow. Tensorflow made some changes that didn't work when using keras, only works when using tensorflow.keras. https://github.com/tensorflow/tensorflow/pull/34870 got merged so this should be automatically fixed with a new tensorflow release.
This issue has been automatically marked as stale due to the lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Did you try import from tensorflow.keras instead of directly from keras?
Did you try import from tensorflow.keras instead of directly from keras?
It's the same for me. Both tensorflow.keras and keras raise the error.
Tensorflow just released version 2.2, this should fix this issue.
The issue persists :(
@DarthAmk97 Use the monkeypatch solution ,it works for me.
@SalahAdDin can you provide a link to or any documentation of that solution?
It is a problem with
keras, right? I mean, you cannot solve it in this implementation, right?i solved it by
--tensorboard-dir ""
@TimNagle-McNaughton This one.
oh. Sadly that doesn't actually fix the functionality, just removes the functionality and the error. Thanks
@TimNagle-McNaughton it is related to Tensorflow library more than this package, unfortunately.
Most helpful comment
i solved it by
--tensorboard-dir ""