简体   繁体   English

如何在 google colab 上上传和使用大型 zip 文件进行深度学习

[英]How to upload and use large zip files on google colab for deep learning

I have a model which can use data from a zip file.我有一个 model 可以使用 zip 文件中的数据。 I have uploaded my dataset to google drive and mounted it on Collab, however when I try and load the zip file it throws an error "BadZipFile: zipfiles that span multiple disks are not supported".我已将我的数据集上传到谷歌驱动器并将其安装在 Collab 上,但是当我尝试加载 zip 文件时,它会引发错误“BadZipFile:不支持跨多个磁盘的 zipfiles”。 I also copied the zip file to the local disk and tried and it throws the same error?我还将 zip 文件复制到本地磁盘并尝试并引发相同的错误? I should note that the file is over 10GB.我应该注意到该文件超过 10GB。 Thanks in advance提前致谢

from google.colab import drive
from zipfile import ZipFile

drive.mount('/content/gdrive')

!cp "/content/gdrive/MyDrive/All of them.zip" "allofthem"

file_name = '/content/sample_data/allofthem.zip'

with ZipFile(file_name, 'r') as zip:
  zip.extractall()
  print('Done')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM