【OpenGait】启动tensorboard 查看训练过程

一、解决办法
OpenGait使用SummaryWriter来记录训练过程中的数据,这些数据可以通过TensorBoard可视化。要查看TensorBoard,你需要在训练开始前启动TensorBoard服务器,并指向保存TensorBoard日志的目录。使用以下命令启动TensorBoard:

tensorboard --logdir=<path_to_summary_directory>

然后在浏览器中打开TensorBoard提供的URL,通常是http://localhost:6006。
在这里插入图片描述
PS <path_to_summary_directory>指的是训练后得到的summary文件,具体地址:
在这里插入图片描述

# Get Started ## Installation 1. clone this repo. ``` git clone https://github.com/ShiqiYu/OpenGait.git ``` 2. Install dependenices: - pytorch >= 1.10 - torchvision - pyyaml - tensorboard - opencv-python - tqdm - py7zr - kornia - einops Install dependenices by [Anaconda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html): ``` conda install tqdm pyyaml tensorboard opencv kornia einops -c conda-forge conda install pytorch==1.10 torchvision -c pytorch ``` Or, Install dependenices by pip: ``` pip install tqdm pyyaml tensorboard opencv-python kornia einops pip install torch==1.10 torchvision==0.11 ``` ## Prepare dataset See [prepare dataset](2.prepare_dataset.md). ## Get trained model - Option 1: ``` python misc/download_pretrained_model.py ``` - Option 2: Go to the [release page](https://github.com/ShiqiYu/OpenGait/releases/), then download the model file and uncompress it to [output](output). ## Train Train a model by ``` CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 opengait/main.py --cfgs ./configs/baseline/baseline.yaml --phase train ``` - `python -m torch.distributed.launch` [DDP](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html) launch instruction. - `--nproc_per_node` The number of gpus to use, and it must equal the length of `CUDA_VISIBLE_DEVICES`. - `--cfgs` The path to config file. - `--phase` Specified as `train`. <!-- - `--iter` You can specify a number of iterations or use `restore_hint` in the config file and resume training from there. --> - `--log_to_file` If specified, the terminal log will be written on disk simultaneously. You can run commands in [train.sh](train.sh) for training different models. ## Test Evaluate the trained model by ``` CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 opengait/main.py --cfgs ./configs/baseline/baseline.yaml --phase test ``` - `--phase` Specified as `test`. - `--iter` Specify a iteration checkpoint. **Tip**: Other arguments are the same as train phase. You can run commands in [test.sh](test.sh) for testing different models. ## Customize 1. Read the [detailed config](docs/1.detailed_config.md) to figure out the usage of needed setting items; 2. See [how to create your model](docs/2.how_to_create_your_model.md); 3. There are some advanced usages, refer to [advanced usages](docs/3.advanced_usages.md), please. ## Warning - In `DDP` mode, zombie processes may be generated when the program terminates abnormally. You can use this command [sh misc/clean_process.sh](./misc/clean_process.sh) to clear them.
最新发布
03-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值