赞
踩
- {
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Python: Current File",
- "type": "python",
- "request": "launch",
- "program": "${file}",
- "console": "integratedTerminal",
- "justMyCode": false,
- "args": [],
-
- "env": {"CUDA_VISIBLE_DEVICES":"0"}
- }
- ]
- }

其中的: "env": {"CUDA_VISIBLE_DEVICES":"0"} 就是设置环境变量,指定gpu. 也可以设置其它环境变量。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。