Google Colab - 输出保存在哪里?

Google Colab - Where is the output saved?

我正在 google 的 colab 上训练机器学习模型。我正在使用带有 tensorflow 后端的 keras (python 3.6)。 我正在使用 keras 提供的 model.save() 函数保存我的模型。当我调用 model.save('model_name)` 时,文件保存在哪里?我在我的驱动器中的任何地方都找不到它。

首先,安装您的驱动器:

!mkdir -p drive
!google-drive-ocamlfuse drive

现在,附加您的路径:

import sys
sys.path.append('drive/Project')

您应该能够使用以下方法查看本地和基于网络的驱动器上的文件:

model.save('drive/Project/myModel.h5')

尽管有点晚了,但我也在为同样的事情而苦苦挣扎question.Then我发现在colab中安装驱动器然后提供驱动器路径,文件将存储在google 开车

from google.colab import drive
drive.mount('/content/gdrive')
#using model.save_weights() to save the weights of the model in HDF5 format
model.save_weights("/content/gdrive/My Drive/weights.h5")

文件保存在名称为 "weights.h5"

的驱动器中