0.引言
1.插件
- 官方的python插件
- 代码助手,自动补全:
- 解释器选择,在窗口右下角选择解释器:
2.环境布置
- 编辑launch.json文件,首先创建json文件:
{
"version": "0.2.0",
"configurations": [
{
"python": "/home/CN/bo.feng/anaconda3/envs/nerf-pytorch/bin/python",
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "/home/CN/bo.feng/NerfMap/nerf-pytoch/run_nerf.py",
"console": "integratedTerminal",
"justMyCode": false,
"args": ["--config", "config/lego.txt"],
"env": {"CUDA_VISIBLE_DEVICES":"0"}
}
]
}
3.parser解析
parser.add_argument(‘–sampler_steps’, type=int, nargs=‘*’, default=[50, 90, 120])
- 用,隔开 “–sampler_steps”, “50”, “90”, “120”,
- 不管字符串类型还是int类型,都是放在"“中就行, 如"3” “str”, 不用"‘str’"
- 需要按F5或者Ctrl+F5进入debug,不能点vscode右上角系统自带的debug,否则无效。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)