1、运行添加配置
2、json配置文件
3、添加相应的参数
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python 调试程序: teacher_test.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/teacher_test.py",
"args": [
"--arch","ResNet50",
"--lr","0.05",
"--gpu-id","0"
],
"console": "integratedTerminal"
},
{
"name": "Python 调试程序: student_test.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/student_test.py",
"args": [
"--t-path",
"./experiments/teacher_ResNet50_seed0/",
"--s-arch",
"MobileNetV2",
"--lr",
"0.05",
"--gpu-id",
"0"
],
"console": "integratedTerminal"
},
{
"name": "Python 调试程序: student.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/student.py",
"args": [
"--t-path",
"./experiments/teacher_ResNet50_seed0/",
"--s-arch",
"MobileNetV2",
"--lr",
"0.05",
"--gpu-id",
"0"
],
"console": "integratedTerminal"
}
]
}
4、最后选择json方式调试