主页

索引

模块索引

搜索页面

Colab

https://img.zhaoweiguo.com/uPic/2023/07/BwtXzm.jpg

在 Colab 里使用 GPU

安装路径都设置到 mount的google drive里

  1. Mount Google Drive:

    from google.colab import drive
    drive.mount('/content/gdrive')
    
    import os, sys
    nb_path = '/content/notebooks'
    os.symlink('/content/gdrive/My Drive/Colab Notebooks', nb_path)
    sys.path.insert(0, nb_path)  # or append(nb_path)
    
  2. Install the module in the notebook folder permanently:

    !pip install --target=$nb_path spacy
    
  3. 【Usage】Mount your Google drive:

    from google.colab import drive
    drive.mount('/content/gdrive')
    
    import sys
    sys.path.append('/content/gdrive/My Drive/Colab Notebooks')
    

参考

主页

索引

模块索引

搜索页面