成功结果
--运行代码段1:
# Load the Drive helper and mount
from google.colab import drive
# This will prompt for authorization.
drive.mount('/content/drive')
--运行代码段2:
# After executing the cell above, Drive
# files will be present in "/content/drive/My Drive".
!ls "/content/drive/My Drive"
--如果要运行drive中某个文件夹程序。代码段:
# 指定当前的工作文件夹
import os
# 此处为google drive中的文件路径,drive为之前指定的工作根目录,要加上
os.chdir("drive/My Drive/cifar10")
--查看当前目录下文件:
!ls