代码拉取完成,页面将自动刷新
This implements training of TSN on the UCF101 dataset, mainly modified from open-mmlab/mmaction2.
As of the current date, Ascend-Pytorch is still inefficient for contiguous operations. Therefore, TSN is re-implemented using semantics such as custom OP.
Download mmcv form source
git clone -b v1.3.9 https://github.com/open-mmlab/mmcv.git
mv mmcv/ mmcv-master/
mv mmcv-master/mmcv ./
rm -rf mmcv-master/
Change file of mmcv
/bin/cp -f mmcv_need/base_runner.py mmcv/runner/base_runner.py
/bin/cp -f mmcv_need/builder.py mmcv/runner/optimizer/builder.py
/bin/cp -f mmcv_need/checkpoint.py mmcv/runner/hooks/checkpoint.py
/bin/cp -f mmcv_need/data_parallel.py mmcv/parallel/data_parallel.py
/bin/cp -f mmcv_need/dist_utils.py mmcv/runner/dist_utils.py
/bin/cp -f mmcv_need/distributed.py mmcv/parallel/distributed.py
/bin/cp -f mmcv_need/epoch_based_runner.py mmcv/runner/epoch_based_runner.py
/bin/cp -f mmcv_need/iter_timer.py mmcv/runner/hooks/iter_timer.py
/bin/cp -f mmcv_need/optimizer.py mmcv/runner/hooks/optimizer.py
/bin/cp -f mmcv_need/test.py mmcv/engine/test.py
/bin/cp -f mmcv_need/transformer.py mmcv/cnn/bricks/transformer.py
To train a model, run train.py
with the desired model architecture.
# 1p train perf
bash test/train_performance_1p.sh --data_path=/opt/npu
# 8p train perf
bash test/train_performance_8p.sh --data_path=/opt/npu
# 8p train full
bash test/train_full_8p.sh --data_path=/opt/npu
# 8p eval
bash test/train_eval_8p.sh --data_path=/opt/npu
# finetuning
bash test/train_finetune_1p.sh --data_path=/opt/npu
# online inference demo
source test/env_npu.sh
python3 demo.py
Note:
Log Path:
Top1 acc | FPS | Epochs | AMP_Type | Device |
---|---|---|---|---|
- | 111.82 | 1 | O2 | 1p Npu |
83.27 | 638.85 | 75 | O2 | 8p Npu |
- | 59.88 | 1 | O2 | 1p Gpu |
82.29 | 958.66 | 75 | O2 | 8p Gpu |
For details about the public address of the code in this repository, you can get from the file public_address_statement.md
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。