环境要求:
python <= 3.8
pytorch <= 1.4.0
NCCL
1.2 安装依赖Note
NCCL: NVIDIA Collective Communications Library, 用于分布式训练中数据并行操作的底层SDK。
查看是否安装nccl:
apt search nccl
安装mmcv:
pip install mmcv==0.2.15 -i https://pypi.doubanio.com/simple/
编译mmdetNote
除了使用镜像安装mmcv-0.2.15之外,还需要修改代码:
from mmcv.runner.utils import get_dist_info --> from mmcv.runner import get_dist_info
移除之前编译的文件,
rm -r build
编译mmdet项目:
python setup.py develop
也可以使用镜像快速安装依赖:
pip install -v -e . -i https://pypi.doubanio.com/simple/Troubleshooting 将gcc降低到8.版本
代码如下:
sudo apt install gcc-8 g++-8 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 10
1.3 训练模型:ttfnet_d53_scratch_aug_10xNote
GCC: GNU Compiler Collection,(GCC原名为GNU-C语言编译器,GNU C Compiler,只能处理C语言)。
修改学习率:
lr=0.015/8
因为原始TTFNet是在8*1080Ti上训练的;
在单个GPU上训练启动训练:
./tools/dist_train.sh configs/ttfnet/ttfnet_d53_scratch_aug_10x.py 1



