免费GPU——Google Colab使用
1、创建新的Notebook
网址:https://colab.research.google.com/
点击“新建笔记本”进行创建
2、设置免费GPU
点击“更改运行时类型”,打开界面如下所示:
选择“T4 GPU”,然后“保存”即可使用免费GPU资源
3、测试是否处于GPU环境
import torch
torch.cuda.is_available()
4、挂载Google Drive
from google.colab import drive
drive.mount('/content/drive')
首先需要创建谷歌帐号,创建好后,使用谷歌帐号登录