vscode
- 调试
在调试代码时,在终端经常第一句先切换路径,路径一般为workspace的目录,比如:
有时需要在特定目录下运行和调试代码,在代码中修改路径很不方便,此时可以在调试选项中创建launch.json文件,比如:
{
// 使用 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": true,
// "cwd": "${workspaceFolder}/pytorch_notebook/flower/"
}
]
}
修改其中的cmd字段
可以在调试代码时,自动切换到该目录,比如
tensorboard
- 将多个events文件(每个events文件单独放在一个文件夹下)放在一个文件夹下,比如:
然后使用test的路径作为logdir的参数,比如:tensorboard --logdir=test --bind-all
,这样可以进行多个曲线的对比