-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
13.1 Quick Draw Cat Autoencoder --'Model'object has no attribute '_get_distribution_strategy' --Issue and Solution #76
Comments
after applying these changes to the lines of code , a new error is coming out ; AttributeError: 'TensorBoard' object has no attribute '_log_write_dir' |
Hi Hadiaz1: Since I upgraded TensorFlow 1.5 to TensorFlow 2.1, so the TensorBoard has separated from Tensorboad. That means that Tensorboard needs to be installed independently. That is Google's new practice. During running the script in Jupyter Notebook, the script has no any problem with the above-mentioned solution. I will try to install TensorBoard on Ubuntu 18.04 and see what happens with TensorBoard. Best regards, Mike |
Hi Hadiaz1: I am wondering whether you have installed TensorFlow 2.x. After installation of TensorBoard v2.2.1, I test the script again on TensorFlow 2.1. 1. Add the magic line of codeLoad the TensorBoard notebook extension at the beginning of the lines of code.
2. Start TensorBoard within the notebook using magics.Please put them after the section of the first training. For example, it has the lines of code autoencoder.fit(...). It originally has the mark In [5]
It shows the first tensorboard instance. 3. Start TensorBoard within the notebook using magics.Please put them after the section of the first training. For example, it has the lines of code variantional_auto_encoder.fit(...). It originally has the mark In [11]
It shows the second tensorboard instance. If you have more findings, please feel free to contact me. Notes:I tied to add the following line of code in the the scripts but did not succeed. file_writer = tf.compat.v1.summary.FileWriter('/path/to/logs', graph). Without the line of code, Tensorboard catches the orginal logs infomration such as LeNet-MNIST-1. It is a compatibility issue between TensorFlow 2.1 and the original script of 13.1 Quick Draw Cat Autoencoder. Google has not further improvement on the issue. Reference: tensorboard: https://github.com/tensorflow/tensorboard/blob/master/docs/tensorboard_in_notebooks.ipynb tensorboard in notebook: https://www.tensorflow.org/tensorboard/tensorboard_in_notebooks tensorboard v2.2.1: https://github.com/tensorflow/tensorboard tensorboard v2.2.1 issue: tensorflow/tensorboard#3634 |
my problem was kinda solved suddenly with some restarts and runs .Thanks you so much anyways, those code changes may have made something ! |
For Anaconda/miniconda3 Environment, there is an error for no attribute '_get_distribution_strategy' , I have found out the solution to the issue as follows.
Issue:
'Model'object has no attribute '_get_distribution_strategy'
Solution:
Go to the following directory
/home/user/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/keras
Open callbacks.py and make the two changes as follows. Please remember to back up the original callbacks.py in aother file for further reference.
Change the lines of code --callbacks.py --1530 line
to the following lines of code.
Change the lines of code --callbacks.py --1728 line
to the following lines of code
Please take the following weblinks for reference.
github1: tensorflow/tensorboard#3125
github2: tensorflow/tensorflow#34870
The text was updated successfully, but these errors were encountered: