栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

TTFNet的学习笔记

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

TTFNet的学习笔记

1 模型复现:ZJULearning/ttfnet 1.1 环境配置

环境要求:
python <= 3.8
pytorch <= 1.4.0
NCCL

Note
NCCL: NVIDIA Collective Communications Library, 用于分布式训练中数据并行操作的底层SDK。

1.2 安装依赖

查看是否安装nccl:

apt search nccl

安装mmcv:

pip install mmcv==0.2.15 -i https://pypi.doubanio.com/simple/

Note
除了使用镜像安装mmcv-0.2.15之外,还需要修改代码:
from mmcv.runner.utils import get_dist_info --> from mmcv.runner import get_dist_info

编译mmdet

移除之前编译的文件,

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

Note
GCC: GNU Compiler Collection,(GCC原名为GNU-C语言编译器,GNU C Compiler,只能处理C语言)。

1.3 训练模型:ttfnet_d53_scratch_aug_10x

修改学习率:

lr=0.015/8

因为原始TTFNet是在8*1080Ti上训练的;

在单个GPU上训练

启动训练:

./tools/dist_train.sh configs/ttfnet/ttfnet_d53_scratch_aug_10x.py 1
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1023089.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号