【问题标题】:How to connect google drive folder to google colab如何将谷歌驱动器文件夹连接到谷歌colab
【发布时间】:2021-06-13 10:29:33
【问题描述】:

需要调用数据文件夹,但是如何在 colab 中调用。我在 spyder 上尝试过,但在 colab 中无法做到,已经安装了谷歌驱动器。

  import torch

  import cv2
  from data import BaseTransform, VOC_CLASSES as labelmap
  from ssd import build_ssd
  import imageio

Image of google drive in collab

如果我能与整个 Windows 1 文件夹交互会更好?

【问题讨论】:

    标签: google-drive-api google-colaboratory


    【解决方案1】:

    您可以使用

    连接到 google colab
    from google.colab import drive
      import os
      drive.mount('/content/drive')
    

    要调用,您可以复制路径。您可以通过右键单击->复制路径来获取文件夹的路径。您可以使用该路径读取/写入该文件夹中的文件。

    【讨论】:

      【解决方案2】:

      谢谢,我知道了 我刚刚做了

      cd /content/drive/Mypath
      

      【讨论】:

        猜你喜欢
        • 2020-12-10
        • 2021-10-05
        • 2019-07-12
        • 2021-03-25
        • 2018-07-19
        • 2018-10-14
        • 2021-07-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多