环境配置
#数据集在谷歌云盘上,挂载谷歌云盘
#colab中已经有pytorch环境,无需专门配置pytorch
from google.colab import drive
drive.mount('/content/drive')
%cd /content/drive/MyDrive
# 下载MMDetection,下载后注释掉
!git clone https://github.com/open-mmlab/mmdetection.git
# 查看torch的版本
import torch
print(torch.__version__)
# 卸载原有的pytorch
!pip uninstall torch torchvision -y
# 查看cuda版本,colab会更新,得根据当前的版本,安装上相匹配的pytorch版本
!nvcc --version