【发布时间】:2019-01-17 05:16:34
【问题描述】:
我有兴趣尝试使用 Google colab 进行 GPU 深度学习,并且我正在关注本教程博客以使用 Google 驱动器设置深度学习环境: https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d
我已经设置了 Google 驱动器和适当的文件夹目录,我在博客“使用 Google Colab 运行或导入 .py 文件 首先运行这些代码以安装必要的库并执行授权”然后我应该在 Google Ipython 编辑器中运行此代码:
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}
代码也按预期执行,然后出现一个超链接和框,我可以在其中复制和粘贴授权密钥。当我粘贴密钥时,没有任何反应。如果 Python 很忙,图标只会一直旋转(忙)...按回车键似乎会删除授权密钥,我认为这也不合适。
使用!kill -9 -1 重新启动虚拟机似乎没有任何作用,然后重新运行代码...任何提示帮助谢谢!!!
【问题讨论】:
标签: python machine-learning deep-learning google-colaboratory