美文网首页TensorFlow
Google colab的使用

Google colab的使用

作者: 上行彩虹人 | 来源:发表于2018-10-29 11:31 被阅读0次

1、挂载云端硬盘:

!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}
!mkdir -p drive
!google-drive-ocamlfuse drive  -o nonempty

相关文章

网友评论

    本文标题:Google colab的使用

    本文链接:https://www.haomeiwen.com/subject/zmfbtqtx.html