48 Star 502 Fork 1.3K

Ascend/ModelZoo-PyTorch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

R(2+1)d模型使用说明

Dataset Prepare

将处理好的数据集放到模型目录的 /data 文件夹下

Requirements

安装依赖

pip3.7 install ./requirements/requirements.txt
注:pillow建议安装较新版本, 与之对应的torchvision版本如果无法直接安装,可使用源码安装对应的版本,源码参考链接:https://github.com/pytorch/vision ,建议Pillow版本是9.1.0 torchvision版本是0.6.0

安装mmcv

git clone -b 1.3.9 https://github.com/open-mmlab/mmcv.git
cd mmcv
MMCV_WITH_OPS=1 pip install -e .  # 安装full版本

Before Train

更改底层文件,分别修改mmcv和apex的底层源码

# mmcv_need
/bin/cp -f additional_need/mmcv/distributed.py ../mmcv/mmcv/parallel/
/bin/cp -f additional_need/mmcv/dist_utils.py ../mmcv/mmcv/runner/
/bin/cp -f additional_need/mmcv/optimizer.py ../mmcv/mmcv/runner/hooks/
/bin/cp -f additional_need/mmcv/text.py ../mmcv/mmcv/runner/hooks/logger/

# apex_need
/bin/cp -f additional_need/amp/scaler.py ../apex/amp/

Train MODEL

单卡

# 精度
sh ./test/run_1p.sh

# 性能
sh ./test/run_1p_perf.sh

8卡

chmod a+x ./tools/dist_train.sh

# 精度
sh ./test/run_8p.sh

# 性能
sh ./test/run_8p_perf.sh

log文件位置

运行产生的log文件和模型的参数文件在 项目目录的 work_dirs 文件夹下

公网地址说明

代码涉及公网地址参考 public_address_statement.md

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ascend/ModelZoo-PyTorch.git
git@gitee.com:ascend/ModelZoo-PyTorch.git
ascend
ModelZoo-PyTorch
ModelZoo-PyTorch
master

搜索帮助