OpenGait代码通常通过命令行执行,例如:
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 opengait/main_test.py --cfgs ./configs/gaitset/gaitset.yaml --phase train
如果希望在 PyCharm 中调试代码,则需要进行一些额外的设置。
一、创建软链接
步骤 1:获取 conda 虚拟环境中的 distributed 路径。可以在 OpenGait 项目的目录中创建一个 testfile.py
文件,并运行以下代码获取路径:
import torch
import os
pat