首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将超大尺寸的hdf5文件上传到google colab?

如何将超大尺寸的hdf5文件上传到google colab?
EN

Stack Overflow用户
提问于 2018-05-20 14:24:35
回答 1查看 1.7K关注 0票数 0

我有一个17 of大小的hdf5文件(图像数据集),我需要上传并在Google Colab中使用,并在此数据集上训练我的模型。但是,当我使用以下代码从我的驱动器上传时,运行时在身份验证过程之后会自动断开连接。是因为文件的大小还是其他问题?有什么解决方案可以克服这个问题吗?

代码片段如下:

代码语言:javascript
复制
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)

# Get the file
downloaded = drive.CreateFile({'id': 'my_id'}) #replace the my_id with id of file you want to access
downloaded.GetContentFile('dataset.hdf5')
EN

回答 1

Stack Overflow用户

发布于 2018-05-29 06:35:23

如果数据集来自kaggle,向Colab提供git url,Colab将自动下载。否则,你只能任由你的互联网连接摆布。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50432245

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档