我试图在一个金丝笔记本中使用谷歌Colab (keras的超参数优化),我成功地安装了hyperas:
!pip install hyperas但是最小化函数参数notebook_name存在一个问题,这是在使用笔记本时必须设置的。
这个对角线必须充满笔记本的路径,但在科拉布,我不知道如何得到它
发布于 2018-04-19 16:19:24
您可以从Google复制notebook.ipybn。然后hyperas可以从中提取信息。
# Install the PyDrive wrapper & import libraries.
!pip install -U -q PyDrive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
# Authenticate and create the PyDrive client.
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)
# Copy/download the file
fid = drive.ListFile({'q':"title='notebook.ipynb'"}).GetList()[0]['id']
f = drive.CreateFile({'id': fid})
f.GetContentFile('notebook.ipynb')发布于 2018-12-02 02:18:13
接受的答案对我不起作用。这是我的解决办法。colab分配的目录是/content/。您需要从google驱动器下载当前的笔记本,并将其上传到/content/。
https://stackoverflow.com/questions/49920031
复制相似问题