docs: fix style
parent
0ca4800fe4
commit
e5ed175b59
|
@ -46,7 +46,8 @@ net = ResNet50()
|
||||||
最后执行函数
|
最后执行函数
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python tools/feature_maps_visualization/fm_vis.py -i the image you want to test \
|
python tools/feature_maps_visualization/fm_vis.py \
|
||||||
|
-i the image you want to test \
|
||||||
-c channel_num -p pretrained model \
|
-c channel_num -p pretrained model \
|
||||||
--show whether to show \
|
--show whether to show \
|
||||||
--interpolation interpolation method\
|
--interpolation interpolation method\
|
||||||
|
@ -57,7 +58,7 @@ python tools/feature_maps_visualization/fm_vis.py -i the image you want to test
|
||||||
参数说明:
|
参数说明:
|
||||||
+ `-i`:待预测的图片文件路径,如 `./test.jpeg`
|
+ `-i`:待预测的图片文件路径,如 `./test.jpeg`
|
||||||
+ `-c`:特征图维度,如 `5`
|
+ `-c`:特征图维度,如 `5`
|
||||||
+ `-p`:权重文件路径,如 `./ResNet50_pretrained/`
|
+ `-p`:权重文件路径,如 `./ResNet50_pretrained`
|
||||||
+ `--interpolation`: 图像插值方式, 默认值 1
|
+ `--interpolation`: 图像插值方式, 默认值 1
|
||||||
+ `--save_path`:保存路径,如:`./tools/`
|
+ `--save_path`:保存路径,如:`./tools/`
|
||||||
+ `--use_gpu`:是否使用 GPU 预测,默认值:True
|
+ `--use_gpu`:是否使用 GPU 预测,默认值:True
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# 多机训练
|
|
||||||
|
|
||||||
分布式训练的高性能,是飞桨的核心优势技术之一,在分类任务上,分布式训练可以达到几乎线性的加速比。
|
|
||||||
[Fleet](https://github.com/PaddlePaddle/Fleet) 是用于 PaddlePaddle 分布式训练的高层 API,基于这套接口用户可以很容易切换到分布式训练程序。
|
|
||||||
为了可以同时支持单机训练和多机训练,[PaddleClas](https://github.com/PaddlePaddle/PaddleClas) 采用 Fleet API 接口,更多的分布式训练可以参考 [Fleet API设计文档](https://github.com/PaddlePaddle/Fleet/blob/develop/README.md)。
|
|
|
@ -10,23 +10,53 @@
|
||||||
### ResNet50
|
### ResNet50
|
||||||
* 命令:
|
* 命令:
|
||||||
|
|
||||||
```python3.7 ppcls/static/train.py -c ppcls/configs/quick_start/kunlun/ResNet50_vd_finetune_kunlun.yaml -o use_gpu=False -o use_xpu=True -o is_distributed=False```
|
```shell
|
||||||
|
python3.7 ppcls/static/train.py \
|
||||||
|
-c ppcls/configs/quick_start/kunlun/ResNet50_vd_finetune_kunlun.yaml \
|
||||||
|
-o use_gpu=False \
|
||||||
|
-o use_xpu=True \
|
||||||
|
-o is_distributed=False
|
||||||
|
```
|
||||||
|
|
||||||
与cpu/gpu训练的区别是加上-o use_xpu=True, 表示执行在昆仑设备上。
|
与cpu/gpu训练的区别是加上-o use_xpu=True, 表示执行在昆仑设备上。
|
||||||
|
|
||||||
### MobileNetV3
|
### MobileNetV3
|
||||||
* 命令:
|
* 命令:
|
||||||
|
|
||||||
```python3.7 ppcls/static/train.py -c ppcls/configs/quick_start/MobileNetV3_large_x1_0.yaml -o use_gpu=False -o use_xpu=True -o is_distributed=False```
|
```shell
|
||||||
|
python3.7 ppcls/static/train.py \
|
||||||
|
-c ppcls/configs/quick_start/MobileNetV3_large_x1_0.yaml \
|
||||||
|
-o use_gpu=False \
|
||||||
|
-o use_xpu=True \
|
||||||
|
-o is_distributed=False
|
||||||
|
```
|
||||||
|
|
||||||
### HRNet
|
### HRNet
|
||||||
* 命令:
|
* 命令:
|
||||||
|
|
||||||
```python3.7 ppcls/static/train.py -c ppcls/configs/quick_start/kunlun/HRNet_W18_C_finetune_kunlun.yaml -o is_distributed=False -o use_xpu=True -o use_gpu=False```
|
```shell
|
||||||
|
python3.7 ppcls/static/train.py \
|
||||||
|
-c ppcls/configs/quick_start/kunlun/HRNet_W18_C_finetune_kunlun.yaml \
|
||||||
|
-o is_distributed=False \
|
||||||
|
-o use_xpu=True \
|
||||||
|
-o use_gpu=False
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### VGG16/19
|
### VGG16/19
|
||||||
* 命令:
|
* 命令:
|
||||||
|
|
||||||
```python3.7 ppcls/static/train.py -c ppcls/configs/quick_start/VGG16_finetune_kunlun.yaml -o use_gpu=False -o use_xpu=True -o is_distributed=False```
|
```shell
|
||||||
```python3.7 ppcls/static/train.py -c ppcls/configs/quick_start/VGG19_finetune_kunlun.yaml -o use_gpu=False -o use_xpu=True -o is_distributed=False```
|
python3.7 ppcls/static/train.py \
|
||||||
|
-c ppcls/configs/quick_start/VGG16_finetune_kunlun.yaml \
|
||||||
|
-o use_gpu=False \
|
||||||
|
-o use_xpu=True \
|
||||||
|
-o is_distributed=False
|
||||||
|
```
|
||||||
|
```shell
|
||||||
|
python3.7 ppcls/static/train.py \
|
||||||
|
-c ppcls/configs/quick_start/VGG19_finetune_kunlun.yaml \
|
||||||
|
-o use_gpu=False \
|
||||||
|
-o use_xpu=True \
|
||||||
|
-o is_distributed=False
|
||||||
|
```
|
||||||
|
|
|
@ -25,9 +25,6 @@ PaddleClas支持在静态图训练方式中使用DALI加速,由于DALI仅支
|
||||||
# 设置用于训练的GPU卡号
|
# 设置用于训练的GPU卡号
|
||||||
export CUDA_VISIBLE_DEVICES="0"
|
export CUDA_VISIBLE_DEVICES="0"
|
||||||
|
|
||||||
# 设置用于神经网络训练的显存大小,可根据具体情况设置,一般可设置为0.8或0.7,剩余显存则预留DALI使用
|
|
||||||
export FLAGS_fraction_of_gpu_memory_to_use=0.80
|
|
||||||
|
|
||||||
python ppcls/static/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o use_dali=True
|
python ppcls/static/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o use_dali=True
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue