我正在使用google colab,但我无法将结果直接从colab保存到我的google drive,甚至无法保存到我的计算机中。有人能帮我一把吗?问候
发布于 2019-09-11 21:19:20
您可以通过执行以下操作将数据保存到Google Drive:
import pickle
from google.colab import drive
from pathlib import Path
# this will mount your google drive in the server where your code is running
drive.mount('/content/gdrive', force_remount=True)
ROOT_DIR = "/content/gdrive/My Drive/"
obj = {'hello': 'world'}
filepath = Path(ROOT_DIR) / 'my_file.pkl'
pickle.dump(obj, open(filepath, 'wb'))发布于 2019-09-22 13:26:34
在挂载你的谷歌硬盘之后。您可以执行以下操作将您的工作保存到驱动器上:1单击文件。2单击在驱动器中保存文件。
https://stackoverflow.com/questions/56994495
复制相似问题