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
Colab notebook gives Keras multi_gpu_model error #231
Comments
Yea, I have the same problem. I have also tried to downgrade keras to 2.2.4 but still have the same ImportError. |
Same problem here, nobody knows a solution? Edit: after the error open the textgennrn.py, by clicking on the blue path, and replace "from tensorflow.keras.utils import multi_gpu_model" to from keras.utils import multi_gpu_utils now you should be able to rerun the cell. I can't guarantee that it now works perfect, I am a total novice with this stuff.... Edit 2: |
Thanks rubbish, it is indeed slower, almost like it's using the cpu instead, but I'll take slow over non-working any day. Thanks for finding this workaround. Clarification: Issue still open, would still love to find a solution that restores the multi-gpu functionality or whatever it is that leads to optimal speed. |
Tried that but get the following error:
|
SOLUTION: Goto Change line 5 to |
just figured out: you can just delete line 5 and it works (with slow cpu) |
If you have managed to modify the "Interactive textgenrnn Demo w/ GPU" Colaboratory Notebook referenced in the repository's README.md in a way that does not error on the cell containing |
In the other issue thread, someone suggested to install from git: |
Yes, it works for me as well! Thank you! |
Verified. I commented out the %tensorflow line and replaced the !pip line with the pip3 jazz above (with a ! in front) and it worked. Thanks xNPx3! Closing the issue. |
Hi, the Collab notebook linked on the main page no longer works. I submitted the tensorflow cell and then the the "!pip install" cell, and it downloaded some kind of wheel (which I've never seen it do before). Then it burped out the following error:
ImportError: cannot import name 'multi_gpu_model' from 'tensorflow.keras.utils' (/usr/local/lib/python3.7/dist-packages/tensorflow/keras/utils/init.py)
It appears some people have solved this by downgrading keras to 2.2.4, but either it didn't work for me - or more likely, I don't know how/where to do this in the notebook. Any ideas?
The text was updated successfully, but these errors were encountered: