update dali & course md
parent
c5ea1738e3
commit
a212aa7153
|
@ -0,0 +1,34 @@
|
|||
# 往期课程链接:
|
||||
---
|
||||
|
||||
- [**【AI快车道PaddleClas系列直播课】**](https://aistudio.baidu.com/aistudio/course/introduce/24519)
|
||||
|
||||
- [图像识别系统解析](https://aistudio.baidu.com/aistudio/education/group/info/24519)
|
||||
- 图像识别全能优势
|
||||
- 整体架构及快速落地详解
|
||||
- 个性化需求实现方案
|
||||
- [商品识别系统全拆解](https://aistudio.baidu.com/aistudio/education/lessonvideo/1495317)
|
||||
- 小样本多类别场景方案
|
||||
- 图像检索技术及快速构建策略
|
||||
- 动漫搜索趣味应用
|
||||
- [车辆ReID核心技术方案](https://aistudio.baidu.com/aistudio/education/lessonvideo/1496537)
|
||||
- ReID及跨境头场景应用
|
||||
- Metric Learning——更鲁棒的检索特征
|
||||
- Logo识别等方向延展
|
||||
- [超轻量图像识别系统概览](https://aistudio.baidu.com/aistudio/education/lessonvideo/1890318)
|
||||
- 图像识别技术选型策略
|
||||
- 推理速度提升8倍的秘籍
|
||||
- 四大典型行业应用案例
|
||||
- [SOTA模型炼丹秘诀](https://aistudio.baidu.com/aistudio/education/lessonvideo/1890323)
|
||||
- CPU定制模型PP-LCNet优化思路
|
||||
- Vison Transformer模型的应用拓展
|
||||
- [商品识别产业痛点剖析](https://aistudio.baidu.com/aistudio/education/lessonvideo/1896890)
|
||||
- 特征提取技术详解
|
||||
- 向量快速检索揭秘
|
||||
- [手把手教你玩转图像识别](https://aistudio.baidu.com/aistudio/education/lessonvideo/1911507)
|
||||
- 产业应用十问十答
|
||||
- 智能零售下的应用案例
|
||||
- 识别系统快速落地方案
|
||||
|
||||
|
||||
|
|
@ -31,29 +31,29 @@
|
|||
<a name='3'></a>
|
||||
|
||||
## 3. 使用 DALI
|
||||
PaddleClas 支持在静态图训练方式中使用 DALI 加速,由于 DALI 仅支持 GPU 训练,因此需要设置 GPU,且 DALI 需要占用 GPU 显存,需要为 DALI 预留显存。使用 DALI 训练只需在训练配置文件中设置字段 `use_dali=True`,或通过以下命令启动训练即可:
|
||||
PaddleClas 支持使用 DALI 对图像预处理进行加速,由于 DALI 仅支持 GPU 训练,因此需要设置 GPU,且 DALI 需要占用 GPU 显存,需要为 DALI 预留显存。使用 DALI 训练只需在训练配置文件中设置字段 `use_dali=True`,或通过以下命令启动训练即可:
|
||||
|
||||
```shell
|
||||
# 设置用于训练的 GPU 卡号
|
||||
export CUDA_VISIBLE_DEVICES="0"
|
||||
|
||||
python ppcls/static/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o use_dali=True
|
||||
python ppcls/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.use_dali=True
|
||||
```
|
||||
|
||||
也可以使用多卡训练:
|
||||
|
||||
```shell
|
||||
# 设置用于训练的 GPU 卡号
|
||||
export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7"
|
||||
export CUDA_VISIBLE_DEVICES="0,1,2,3"
|
||||
|
||||
# 设置用于神经网络训练的显存大小,可根据具体情况设置,一般可设置为 0.8 或 0.7,剩余显存则预留 DALI 使用
|
||||
export FLAGS_fraction_of_gpu_memory_to_use=0.80
|
||||
|
||||
python -m paddle.distributed.launch \
|
||||
--gpus="0,1,2,3,4,5,6,7" \
|
||||
ppcls/static/train.py \
|
||||
--gpus="0,1,2,3" \
|
||||
ppcls/train.py \
|
||||
-c ./ppcls/configs/ImageNet/ResNet/ResNet50.yaml \
|
||||
-o use_dali=True
|
||||
-o Global.use_dali=True
|
||||
```
|
||||
|
||||
<a name='4'></a>
|
||||
|
@ -62,11 +62,11 @@ python -m paddle.distributed.launch \
|
|||
在上述基础上,使用 FP16 半精度训练,可以进一步提高速度,可以参考下面的配置与运行命令。
|
||||
|
||||
```shell
|
||||
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
|
||||
export CUDA_VISIBLE_DEVICES=0,1,2,3
|
||||
export FLAGS_fraction_of_gpu_memory_to_use=0.8
|
||||
|
||||
python -m paddle.distributed.launch \
|
||||
--gpus="0,1,2,3,4,5,6,7" \
|
||||
ppcls/static/train.py \
|
||||
-c ./ppcls/configs/ImageNet/ResNet/ResNet50_fp16.yaml
|
||||
--gpus="0,1,2,3" \
|
||||
ppcls/train.py \
|
||||
-c ./ppcls/configs/ImageNet/ResNet/ResNet50_fp16_dygraph.yaml
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue