未验证 提交 e8b99c75 编写于 作者: C cuicheng01 提交者: GitHub

Merge pull request #2114 from PaddlePaddle/develop

Merge develop to release/2.4
...@@ -41,6 +41,8 @@ def main(): ...@@ -41,6 +41,8 @@ def main():
'inference.pdmodel')) and os.path.exists( 'inference.pdmodel')) and os.path.exists(
os.path.join(config["Global"]["save_inference_dir"], os.path.join(config["Global"]["save_inference_dir"],
'inference.pdiparams')) 'inference.pdiparams'))
if "Query" in config["DataLoader"]["Eval"]:
config["DataLoader"]["Eval"] = config["DataLoader"]["Eval"]["Query"]
config["DataLoader"]["Eval"]["sampler"]["batch_size"] = 1 config["DataLoader"]["Eval"]["sampler"]["batch_size"] = 1
config["DataLoader"]["Eval"]["loader"]["num_workers"] = 0 config["DataLoader"]["Eval"]["loader"]["num_workers"] = 0
......
...@@ -541,9 +541,9 @@ The accuracy and speed indicators of MobileViT series models are shown in the fo ...@@ -541,9 +541,9 @@ The accuracy and speed indicators of MobileViT series models are shown in the fo
| Model | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | time(ms)<br/>bs=8 | FLOPs(M) | Params(M) | Pretrained Model Download Address | Inference Model Download Address | | Model | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | time(ms)<br/>bs=8 | FLOPs(M) | Params(M) | Pretrained Model Download Address | Inference Model Download Address |
| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 1849.35 | 5.59 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) | | MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 337.24 | 1.28 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
| MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) | | MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) |
| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 337.24 | 1.28 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) | | MobileViT_S | 0.7814 | 0.9413 | - | - | - | 1849.35 | 5.59 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
<a name="26"></a> <a name="26"></a>
......
...@@ -18,6 +18,6 @@ MobileViT is a lightweight visual Transformer network that can be used as a gene ...@@ -18,6 +18,6 @@ MobileViT is a lightweight visual Transformer network that can be used as a gene
| Models | Top1 | Top5 | Reference<br>top1 | Reference<br>top5 | FLOPs<br>(M) | Params<br>(M) | | Models | Top1 | Top5 | Reference<br>top1 | Reference<br>top5 | FLOPs<br>(M) | Params<br>(M) |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:| |:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 1849.35 | 5.59 | | MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 337.24 | 1.28 |
| MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 | | MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 |
| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 337.24 | 1.28 | | MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 1849.35 | 5.59 |
docs/images/PP-HGNet/PP-HGNet-block.png

104.2 KB | W: | H:

docs/images/PP-HGNet/PP-HGNet-block.png

405.7 KB | W: | H:

docs/images/PP-HGNet/PP-HGNet-block.png
docs/images/PP-HGNet/PP-HGNet-block.png
docs/images/PP-HGNet/PP-HGNet-block.png
docs/images/PP-HGNet/PP-HGNet-block.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
从表中可以看出,backbone 为 Res2Net200_vd_26w_4s 时精度较高,但是推理速度较慢。将 backbone 替换为轻量级模型 MobileNetV3_small_x0_35 后,速度可以大幅提升,但是精度下降明显。将 backbone 替换为 PPLCNet_x1_0 时,精度提升 2 个百分点,同时速度也提升 23% 左右。在此基础上,使用 SSLD 预训练模型后,在不改变推理速度的前提下,精度可以提升约 0.5 个百分点,进一步地,当融合EDA策略后,精度可以再提升 0.52 个百分点,最后,在使用 SKL-UGI 知识蒸馏后,精度可以继续提升 0.23 个百分点。此时,PPLCNet_x1_0 的精度与 Res2Net200_vd_26w_4s 仅相差 0.55 个百分点,但是速度快 32 倍。关于 PULC 的训练方法和推理部署方法将在下面详细介绍。 从表中可以看出,backbone 为 Res2Net200_vd_26w_4s 时精度较高,但是推理速度较慢。将 backbone 替换为轻量级模型 MobileNetV3_small_x0_35 后,速度可以大幅提升,但是精度下降明显。将 backbone 替换为 PPLCNet_x1_0 时,精度提升 2 个百分点,同时速度也提升 23% 左右。在此基础上,使用 SSLD 预训练模型后,在不改变推理速度的前提下,精度可以提升约 0.5 个百分点,进一步地,当融合EDA策略后,精度可以再提升 0.52 个百分点,最后,在使用 SKL-UGI 知识蒸馏后,精度可以继续提升 0.23 个百分点。此时,PPLCNet_x1_0 的精度与 Res2Net200_vd_26w_4s 仅相差 0.55 个百分点,但是速度快 32 倍。关于 PULC 的训练方法和推理部署方法将在下面详细介绍。
**备注:** **备注:**
* 延时是基于 Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz 测试得到,开启 MKLDNN 加速策略,线程数为10。 * 延时是基于 Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz 测试得到,开启 MKLDNN 加速策略,线程数为10。
* 关于PP-LCNet的介绍可以参考[PP-LCNet介绍](../models/PP-LCNet.md),相关论文可以查阅[PP-LCNet paper](https://arxiv.org/abs/2109.15099) * 关于PP-LCNet的介绍可以参考[PP-LCNet介绍](../models/PP-LCNet.md),相关论文可以查阅[PP-LCNet paper](https://arxiv.org/abs/2109.15099)
...@@ -178,7 +178,7 @@ from xml.dom.minidom import parse ...@@ -178,7 +178,7 @@ from xml.dom.minidom import parse
vehicleids = [] vehicleids = []
def convert_annotation(input_fp, output_fp): def convert_annotation(input_fp, output_fp, subdir):
in_file = open(input_fp) in_file = open(input_fp)
list_file = open(output_fp, 'w') list_file = open(output_fp, 'w')
tree = parse(in_file) tree = parse(in_file)
...@@ -201,12 +201,12 @@ def convert_annotation(input_fp, output_fp): ...@@ -201,12 +201,12 @@ def convert_annotation(input_fp, output_fp):
typeid = int (item.getAttribute("typeID")) typeid = int (item.getAttribute("typeID"))
label[typeid+9] = '1' label[typeid+9] = '1'
label = ','.join(label) label = ','.join(label)
list_file.write(os.path.join('image_train', name) + "\t" + label + "\n") list_file.write(os.path.join(subdir, name) + "\t" + label + "\n")
list_file.close() list_file.close()
convert_annotation('train_label.xml', 'train_list.txt') #imagename vehiclenum colorid typeid convert_annotation('train_label.xml', 'train_list.txt', 'image_train') #imagename vehiclenum colorid typeid
convert_annotation('test_label.xml', 'test_list.txt') convert_annotation('test_label.xml', 'test_list.txt', 'image_test')
``` ```
执行上述命令后,`VeRi`目录中具有以下数据: 执行上述命令后,`VeRi`目录中具有以下数据:
......
...@@ -568,9 +568,9 @@ ViT(Vision Transformer) 与 DeiT(Data-efficient Image Transformers)系列模 ...@@ -568,9 +568,9 @@ ViT(Vision Transformer) 与 DeiT(Data-efficient Image Transformers)系列模
| 模型 | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | time(ms)<br/>bs=8 | FLOPs(M) | Params(M) | 预训练模型下载地址 | inference模型下载地址 | | 模型 | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | time(ms)<br/>bs=8 | FLOPs(M) | Params(M) | 预训练模型下载地址 | inference模型下载地址 |
| ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ---------- | --------- | --------- | ---------------- | ---------------- | -------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 1849.35 | 5.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) | | MobileViT_XXS | 0.6867 | 0.8878 | - | - | - | 337.24 | 1.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XXS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XXS_infer.tar) |
| MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) | | MobileViT_XS | 0.7454 | 0.9227 | - | - | - | 930.75 | 2.33 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_XS_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_XS_infer.tar) |
| MobileViT_S | 0.7814 | 0.9413 | - | - | - | 337.24 | 1.28 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) | | MobileViT_S | 0.7814 | 0.9413 | - | - | - | 1849.35 | 5.59 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileViT_S_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileViT_S_infer.tar) |
<a name="Others"></a> <a name="Others"></a>
......
...@@ -17,6 +17,6 @@ MobileViT 是一个轻量级的视觉 Transformer 网络,可以用作计算机 ...@@ -17,6 +17,6 @@ MobileViT 是一个轻量级的视觉 Transformer 网络,可以用作计算机
| Models | Top1 | Top5 | Reference<br>top1 | Reference<br>top5 | FLOPs<br>(M) | Params<br>(M) | | Models | Top1 | Top5 | Reference<br>top1 | Reference<br>top5 | FLOPs<br>(M) | Params<br>(M) |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:| |:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 1849.35 | 5.59 | | MobileViT_XXS | 0.6867 | 0.8878 | 0.690 | - | 337.24 | 1.28 |
| MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 | | MobileViT_XS | 0.7454 | 0.9227 | 0.747 | - | 930.75 | 2.33 |
| MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 337.24 | 1.28 | | MobileViT_S | 0.7814 | 0.9413 | 0.783 | - | 1849.35 | 5.59 |
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
- [1.2 模型细节](#1.2) - [1.2 模型细节](#1.2)
- [1.3 实验结果](#1.3) - [1.3 实验结果](#1.3)
- [2. 模型快速体验](#2) - [2. 模型快速体验](#2)
- [2.1 安装 paddleclas](#2.1) - [2.1 安装 paddlepaddle](#2.1)
- [2.2 预测](#2.2) - [2.2 安装 paddleclas](#2.2)
- [2.3 预测](#2.3)
- [3. 模型训练、评估和预测](#3) - [3. 模型训练、评估和预测](#3)
- [3.1 环境配置](#3.1) - [3.1 环境配置](#3.1)
- [3.2 数据准备](#3.2) - [3.2 数据准备](#3.2)
...@@ -88,24 +89,43 @@ PP-HGNet 与其他模型的比较如下,其中测试机器为 NVIDIA® Tesla® ...@@ -88,24 +89,43 @@ PP-HGNet 与其他模型的比较如下,其中测试机器为 NVIDIA® Tesla®
| ResNeXt101_32x48d_wsl | 85.37 | 97.69 | 55.07 | | ResNeXt101_32x48d_wsl | 85.37 | 97.69 | 55.07 |
| SwinTransformer_base | 85.2 | 97.5 | 13.53 | | SwinTransformer_base | 85.2 | 97.5 | 13.53 |
| <b>PPHGNet_base_ssld<b> | <b>85.00<b>| <b>97.35<b> | <b>5.97<b> | | <b>PPHGNet_base_ssld<b> | <b>85.00<b>| <b>97.35<b> | <b>5.97<b> |
<a name="2"></a>
<a name="2"></a>
## 2. 模型快速体验 ## 2. 模型快速体验
<a name="2.1"></a> <a name="2.1"></a>
### 2.1 安装 paddleclas ### 2.1 安装 paddlepaddle
使用如下命令快速安装 paddlepaddle, paddleclas - 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
``` ```bash
pip3 install paddlepaddle paddleclas python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
```
- 您的机器是CPU,请运行以下命令安装
```bash
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
``` ```
<a name="2.2"></a>
更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。
<a name="2.2"></a>
### 2.2 安装 paddleclas
使用如下命令快速安装 paddleclas
```
pip3 install paddleclas
```
<a name="2.3"></a>
### 2.2 预测 ### 2.3 预测
* 在命令行中使用 PPHGNet_small 的权重快速预测 * 在命令行中使用 PPHGNet_small 的权重快速预测
......
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
- [1.4.2 基于 V100 GPU 的预测速度](#1.4.2) - [1.4.2 基于 V100 GPU 的预测速度](#1.4.2)
- [1.4.3 基于 SD855 的预测速度](#1.4.3) - [1.4.3 基于 SD855 的预测速度](#1.4.3)
- [2. 模型快速体验](#2) - [2. 模型快速体验](#2)
- [2.1 安装 paddleclas](#2.1) - [2.1 安装 paddlepaddle](#2.1)
- [2.2 预测](#2.2) - [2.2 安装 paddleclas](#2.2)
- [2.3 预测](#2.3)
- [3. 模型训练、评估和预测](#3) - [3. 模型训练、评估和预测](#3)
- [3.1 环境配置](#3.1) - [3.1 环境配置](#3.1)
- [3.2 数据准备](#3.2) - [3.2 数据准备](#3.2)
...@@ -240,16 +241,35 @@ MobileNetV3_large_x0_75 | 64.53 | 151 | ...@@ -240,16 +241,35 @@ MobileNetV3_large_x0_75 | 64.53 | 151 |
<a name="2.1"></a> <a name="2.1"></a>
### 2.1 安装 paddleclas ### 2.1 安装 paddlepaddle
使用如下命令快速安装 paddlepaddle, paddleclas - 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
``` ```bash
pip3 install paddlepaddle paddleclas python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
```
- 您的机器是CPU,请运行以下命令安装
```bash
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```
更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。
<a name="2.2"></a>
### 2.2 安装 paddleclas
使用如下命令快速安装 paddleclas
```
pip3 install paddleclas
``` ```
<a name="2.2"></a>
### 2.2 预测 <a name="2.3"></a>
### 2.3 预测
* 在命令行中使用 PPLCNet_x1_0 的权重快速预测 * 在命令行中使用 PPLCNet_x1_0 的权重快速预测
......
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
- [1.2.5 SE 模块](#1.2.5) - [1.2.5 SE 模块](#1.2.5)
- [1.3 实验结果](#1.3) - [1.3 实验结果](#1.3)
- [2. 模型快速体验](#2) - [2. 模型快速体验](#2)
- [2.1 安装 paddleclas](#2.1) - [2.1 安装 paddlepaddle](#2.1)
- [2.2 预测](#2.2) - [2.2 安装 paddleclas](#2.2)
- [2.3 预测](#2.3)
- [3. 模型训练、评估和预测](#3) - [3. 模型训练、评估和预测](#3)
- [3.1 环境配置](#3.1) - [3.1 环境配置](#3.1)
- [3.2 数据准备](#3.2) - [3.2 数据准备](#3.2)
...@@ -114,22 +115,41 @@ PPLCNetV2 目前提供的模型的精度、速度指标及预训练权重链接 ...@@ -114,22 +115,41 @@ PPLCNetV2 目前提供的模型的精度、速度指标及预训练权重链接
| <b>PPLCNetV2_base_ssld<b> | <b>6.6<b> | <b>604<b> | <b>80.07<b> | <b>94.87<b> | <b>4.32<b> | | <b>PPLCNetV2_base_ssld<b> | <b>6.6<b> | <b>604<b> | <b>80.07<b> | <b>94.87<b> | <b>4.32<b> |
<a name="2"></a> <a name="2"></a>
## 2. 模型快速体验 ## 2. 模型快速体验
<a name="2.1"></a> <a name="2.1"></a>
### 2.1 安装 paddleclas ### 2.1 安装 paddlepaddle
使用如下命令快速安装 paddlepaddle, paddleclas - 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
``` ```bash
pip3 install paddlepaddle paddleclas python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
```
- 您的机器是CPU,请运行以下命令安装
```bash
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```
更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。
<a name="2.2"></a>
### 2.2 安装 paddleclas
使用如下命令快速安装 paddleclas
```
pip3 install paddleclas
``` ```
<a name="2.2"></a>
### 2.2 预测 <a name="2.3"></a>
### 2.3 预测
* 在命令行中使用 PPLCNetV2_base 的权重快速预测 * 在命令行中使用 PPLCNetV2_base 的权重快速预测
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
- [1.3.1 基于 V100 GPU 的预测速度](#1.3.1) - [1.3.1 基于 V100 GPU 的预测速度](#1.3.1)
- [1.3.2 基于 T4 GPU 的预测速度](#1.3.2) - [1.3.2 基于 T4 GPU 的预测速度](#1.3.2)
- [2. 模型快速体验](#2) - [2. 模型快速体验](#2)
- [2.1 安装 paddleclas](#2.1) - [2.1 安装 paddlepaddle](#2.1)
- [2.2 预测](#2.2) - [2.2 安装 paddleclas](#2.2)
- [2.3 预测](#2.3)
- [3. 模型训练、评估和预测](#3) - [3. 模型训练、评估和预测](#3)
- [3.1 环境配置](#3.1) - [3.1 环境配置](#3.1)
- [3.2 数据准备](#3.2) - [3.2 数据准备](#3.2)
...@@ -131,16 +132,34 @@ PaddleClas 提供的 ResNet 系列的模型包括 ResNet50,ResNet50_vd,ResNe ...@@ -131,16 +132,34 @@ PaddleClas 提供的 ResNet 系列的模型包括 ResNet50,ResNet50_vd,ResNe
<a name="2.1"></a> <a name="2.1"></a>
### 2.1 安装 paddleclas ### 2.1 安装 paddlepaddle
使用如下命令快速安装 paddlepaddle, paddleclas - 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
``` ```bash
pip3 install paddlepaddle paddleclas python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
```
- 您的机器是CPU,请运行以下命令安装
```bash
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```
更多的版本需求,请参照[飞桨官网安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。
<a name="2.2"></a>
### 2.2 安装 paddleclas
使用如下命令快速安装 paddleclas
```
pip3 install paddleclas
``` ```
<a name="2.2"></a> <a name="2.3"></a>
### 2.2 预测 ### 2.3 预测
* 在命令行中使用 ResNet50 的权重快速预测 * 在命令行中使用 ResNet50 的权重快速预测
......
...@@ -340,6 +340,7 @@ def print_info(): ...@@ -340,6 +340,7 @@ def print_info():
first_width = 30 first_width = 30
second_width = total_width - first_width if total_width > 50 else 10 second_width = total_width - first_width if total_width > 50 else 10
except OSError: except OSError:
total_width = 100
second_width = 100 second_width = 100
for series in IMN_MODEL_SERIES: for series in IMN_MODEL_SERIES:
names = textwrap.fill( names = textwrap.fill(
...@@ -452,7 +453,9 @@ class PaddleClas(object): ...@@ -452,7 +453,9 @@ class PaddleClas(object):
"""PaddleClas. """PaddleClas.
""" """
print_info() if not os.environ.get('ppcls', False):
os.environ.setdefault('ppcls', 'True')
print_info()
def __init__(self, def __init__(self,
model_name: str=None, model_name: str=None,
......
...@@ -62,7 +62,7 @@ def drop_path(x, drop_prob=0., training=False): ...@@ -62,7 +62,7 @@ def drop_path(x, drop_prob=0., training=False):
return x return x
keep_prob = paddle.to_tensor(1 - drop_prob) keep_prob = paddle.to_tensor(1 - drop_prob)
shape = (paddle.shape(x)[0], ) + (1, ) * (x.ndim - 1) shape = (paddle.shape(x)[0], ) + (1, ) * (x.ndim - 1)
random_tensor = keep_prob + paddle.rand(shape, dtype=x.dtype) random_tensor = keep_prob + paddle.rand(shape).astype(x.dtype)
random_tensor = paddle.floor(random_tensor) # binarize random_tensor = paddle.floor(random_tensor) # binarize
output = x.divide(keep_prob) * random_tensor output = x.divide(keep_prob) * random_tensor
return output return output
......
...@@ -48,6 +48,12 @@ def quantize_model(config, model, mode="train"): ...@@ -48,6 +48,12 @@ def quantize_model(config, model, mode="train"):
QUANT_CONFIG["activation_preprocess_type"] = "PACT" QUANT_CONFIG["activation_preprocess_type"] = "PACT"
if mode in ["infer", "export"]: if mode in ["infer", "export"]:
QUANT_CONFIG['activation_preprocess_type'] = None QUANT_CONFIG['activation_preprocess_type'] = None
# for rep nets, convert to reparameterized model first
for layer in model.sublayers():
if hasattr(layer, "rep"):
layer.rep()
model.quanter = QAT(config=QUANT_CONFIG) model.quanter = QAT(config=QUANT_CONFIG)
model.quanter.quantize(model) model.quanter.quantize(model)
logger.info("QAT model summary:") logger.info("QAT model summary:")
......
...@@ -430,7 +430,7 @@ class RandCropImageV2(object): ...@@ -430,7 +430,7 @@ class RandCropImageV2(object):
def __call__(self, img): def __call__(self, img):
if isinstance(img, np.ndarray): if isinstance(img, np.ndarray):
img_h, img_w = img.shap[0], img.shap[1] img_h, img_w = img.shape[0], img.shape[1]
else: else:
img_w, img_h = img.size img_w, img_h = img.size
tw, th = self.size tw, th = self.size
......
...@@ -466,7 +466,7 @@ class Engine(object): ...@@ -466,7 +466,7 @@ class Engine(object):
# for rep nets # for rep nets
for layer in self.model.sublayers(): for layer in self.model.sublayers():
if hasattr(layer, "rep"): if hasattr(layer, "rep") and not getattr(layer, "is_repped"):
layer.rep() layer.rep()
save_path = os.path.join(self.config["Global"]["save_inference_dir"], save_path = os.path.join(self.config["Global"]["save_inference_dir"],
......
...@@ -159,7 +159,15 @@ def cal_feature(engine, name='gallery'): ...@@ -159,7 +159,15 @@ def cal_feature(engine, name='gallery'):
if len(batch) == 3: if len(batch) == 3:
has_unique_id = True has_unique_id = True
batch[2] = batch[2].reshape([-1, 1]).astype("int64") batch[2] = batch[2].reshape([-1, 1]).astype("int64")
out = engine.model(batch[0], batch[1]) if engine.amp and engine.amp_eval:
with paddle.amp.auto_cast(
custom_black_list={
"flatten_contiguous_range", "greater_than"
},
level=engine.amp_level):
out = engine.model(batch[0], batch[1])
else:
out = engine.model(batch[0], batch[1])
if "Student" in out: if "Student" in out:
out = out["Student"] out = out["Student"]
......
...@@ -236,8 +236,13 @@ class DistillationDKDLoss(DKDLoss): ...@@ -236,8 +236,13 @@ class DistillationDKDLoss(DKDLoss):
temperature=1.0, temperature=1.0,
alpha=1.0, alpha=1.0,
beta=1.0, beta=1.0,
use_target_as_gt=False,
name="loss_dkd"): name="loss_dkd"):
super().__init__(temperature=temperature, alpha=alpha, beta=beta) super().__init__(
temperature=temperature,
alpha=alpha,
beta=beta,
use_target_as_gt=use_target_as_gt)
self.key = key self.key = key
self.model_name_pairs = model_name_pairs self.model_name_pairs = model_name_pairs
self.name = name self.name = name
......
...@@ -10,13 +10,20 @@ class DKDLoss(nn.Layer): ...@@ -10,13 +10,20 @@ class DKDLoss(nn.Layer):
Code was heavily based on https://github.com/megvii-research/mdistiller Code was heavily based on https://github.com/megvii-research/mdistiller
""" """
def __init__(self, temperature=1.0, alpha=1.0, beta=1.0): def __init__(self,
temperature=1.0,
alpha=1.0,
beta=1.0,
use_target_as_gt=False):
super().__init__() super().__init__()
self.temperature = temperature self.temperature = temperature
self.alpha = alpha self.alpha = alpha
self.beta = beta self.beta = beta
self.use_target_as_gt = use_target_as_gt
def forward(self, logits_student, logits_teacher, target): def forward(self, logits_student, logits_teacher, target=None):
if target is None or self.use_target_as_gt:
target = logits_teacher.argmax(axis=-1)
gt_mask = _get_gt_mask(logits_student, target) gt_mask = _get_gt_mask(logits_student, target)
other_mask = 1 - gt_mask other_mask = 1 - gt_mask
pred_student = F.softmax(logits_student / self.temperature, axis=1) pred_student = F.softmax(logits_student / self.temperature, axis=1)
......
...@@ -16,9 +16,9 @@ from __future__ import absolute_import ...@@ -16,9 +16,9 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
from paddle import optimizer as optim import inspect
import paddle
from paddle import optimizer as optim
from ppcls.utils import logger from ppcls.utils import logger
...@@ -49,21 +49,32 @@ class SGD(object): ...@@ -49,21 +49,32 @@ class SGD(object):
learning_rate=0.001, learning_rate=0.001,
weight_decay=None, weight_decay=None,
grad_clip=None, grad_clip=None,
multi_precision=False,
name=None): name=None):
self.learning_rate = learning_rate self.learning_rate = learning_rate
self.weight_decay = weight_decay self.weight_decay = weight_decay
self.grad_clip = grad_clip self.grad_clip = grad_clip
self.multi_precision = multi_precision
self.name = name self.name = name
def __call__(self, model_list): def __call__(self, model_list):
# model_list is None in static graph # model_list is None in static graph
parameters = sum([m.parameters() for m in model_list], parameters = sum([m.parameters() for m in model_list],
[]) if model_list else None []) if model_list else None
opt = optim.SGD(learning_rate=self.learning_rate, argspec = inspect.getargspec(optim.SGD.__init__).args
parameters=parameters, if 'multi_precision' in argspec:
weight_decay=self.weight_decay, opt = optim.SGD(learning_rate=self.learning_rate,
grad_clip=self.grad_clip, parameters=parameters,
name=self.name) weight_decay=self.weight_decay,
grad_clip=self.grad_clip,
multi_precision=self.multi_precision,
name=self.name)
else:
opt = optim.SGD(learning_rate=self.learning_rate,
parameters=parameters,
weight_decay=self.weight_decay,
grad_clip=self.grad_clip,
name=self.name)
return opt return opt
...@@ -242,8 +253,9 @@ class AdamW(object): ...@@ -242,8 +253,9 @@ class AdamW(object):
if self.one_dim_param_no_weight_decay: if self.one_dim_param_no_weight_decay:
self.no_weight_decay_param_name_list += [ self.no_weight_decay_param_name_list += [
p.name for model in model_list p.name
for n, p in model.named_parameters() if len(p.shape) == 1 for model in model_list for n, p in model.named_parameters()
if len(p.shape) == 1
] if model_list else [] ] if model_list else []
opt = optim.AdamW( opt = optim.AdamW(
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import datetime
import logging
import os import os
import sys import sys
import logging
import datetime
import paddle.distributed as dist import paddle.distributed as dist
_logger = None _logger = None
...@@ -39,8 +39,12 @@ def init_logger(name='ppcls', log_file=None, log_level=logging.INFO): ...@@ -39,8 +39,12 @@ def init_logger(name='ppcls', log_file=None, log_level=logging.INFO):
logging.Logger: The expected logger. logging.Logger: The expected logger.
""" """
global _logger global _logger
assert _logger is None, "logger should not be initialized twice or more."
_logger = logging.getLogger(name) # solve mutiple init issue when using paddleclas.py and engin.engin
init_flag = False
if _logger is None:
_logger = logging.getLogger(name)
init_flag = True
formatter = logging.Formatter( formatter = logging.Formatter(
'[%(asctime)s] %(name)s %(levelname)s: %(message)s', '[%(asctime)s] %(name)s %(levelname)s: %(message)s',
...@@ -48,13 +52,32 @@ def init_logger(name='ppcls', log_file=None, log_level=logging.INFO): ...@@ -48,13 +52,32 @@ def init_logger(name='ppcls', log_file=None, log_level=logging.INFO):
stream_handler = logging.StreamHandler(stream=sys.stdout) stream_handler = logging.StreamHandler(stream=sys.stdout)
stream_handler.setFormatter(formatter) stream_handler.setFormatter(formatter)
_logger.addHandler(stream_handler) stream_handler._name = 'stream_handler'
# add stream_handler when _logger dose not contain stream_handler
for i, h in enumerate(_logger.handlers):
if h.get_name() == stream_handler.get_name():
break
if i == len(_logger.handlers) - 1:
_logger.addHandler(stream_handler)
if init_flag:
_logger.addHandler(stream_handler)
if log_file is not None and dist.get_rank() == 0: if log_file is not None and dist.get_rank() == 0:
log_file_folder = os.path.split(log_file)[0] log_file_folder = os.path.split(log_file)[0]
os.makedirs(log_file_folder, exist_ok=True) os.makedirs(log_file_folder, exist_ok=True)
file_handler = logging.FileHandler(log_file, 'a') file_handler = logging.FileHandler(log_file, 'a')
file_handler.setFormatter(formatter) file_handler.setFormatter(formatter)
_logger.addHandler(file_handler) file_handler._name = 'file_handler'
# add file_handler when _logger dose not contain same file_handler
for i, h in enumerate(_logger.handlers):
if h.get_name() == file_handler.get_name() and \
h.baseFilename == file_handler.baseFilename:
break
if i == len(_logger.handlers) - 1:
_logger.addHandler(file_handler)
if dist.get_rank() == 0: if dist.get_rank() == 0:
_logger.setLevel(log_level) _logger.setLevel(log_level)
else: else:
......
...@@ -107,6 +107,7 @@ bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/MobileNetV3/Mo ...@@ -107,6 +107,7 @@ bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/MobileNetV3/Mo
各功能测试中涉及混合精度、裁剪、量化等训练相关,及mkldnn、Tensorrt等多种预测相关参数配置,请点击下方相应链接了解更多细节和使用教程: 各功能测试中涉及混合精度、裁剪、量化等训练相关,及mkldnn、Tensorrt等多种预测相关参数配置,请点击下方相应链接了解更多细节和使用教程:
- [test_train_inference_python 使用](docs/test_train_inference_python.md):测试基于Python的模型训练、评估、推理等基本功能,包括裁剪、量化、蒸馏。 - [test_train_inference_python 使用](docs/test_train_inference_python.md):测试基于Python的模型训练、评估、推理等基本功能,包括裁剪、量化、蒸馏。
- [test_train_pact_inference_python 使用](docs/test_train_pact_inference_python.md):测试基于Python的模型PACT在线量化等基本功能。
- [test_inference_cpp 使用](docs/test_inference_cpp.md) :测试基于C++的模型推理。 - [test_inference_cpp 使用](docs/test_inference_cpp.md) :测试基于C++的模型推理。
- [test_serving 使用](docs/test_serving.md) :测试基于Paddle Serving的服务化部署功能。 - [test_serving 使用](docs/test_serving.md) :测试基于Paddle Serving的服务化部署功能。
- [test_lite_arm_cpu_cpp 使用](docs/test_lite_arm_cpu_cpp.md): 测试基于Paddle-Lite的ARM CPU端c++预测部署功能. - [test_lite_arm_cpu_cpp 使用](docs/test_lite_arm_cpu_cpp.md): 测试基于Paddle-Lite的ARM CPU端c++预测部署功能.
......
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,14 +39,14 @@ infer_export:True ...@@ -39,14 +39,14 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_rec.py -c configs/inference_rec.yaml inference:python/predict_rec.py -c configs/inference_rec.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.rec_inference_model_dir:../inference -o Global.rec_inference_model_dir:../inference
-o Global.infer_imgs:../dataset/Aliproduct/demo_test/ -o Global.infer_imgs:../dataset/Aliproduct/demo_test/
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
null:null null:null
===========================train_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=100
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.004 -o Global.pretrained_model="pretrained_model/general_PPLCNet_x2_5_pretrained_v1.0"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/pretrain/general_PPLCNet_x2_5_pretrained_v1.0.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_rec.py -c configs/inference_rec.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.rec_inference_model_dir:../inference
-o Global.infer_imgs:../dataset/Aliproduct/demo_test/
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=100
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5.yaml -o Global.save_inference_dir=./general_PPLCNet_x2_5_lite_v1.0_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/inference/general_PPLCNet_x2_5_lite_v1.0_infer.tar
infer_model:./general_PPLCNet_x2_5_lite_v1.0_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_rec.py -c configs/inference_rec.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.rec_inference_model_dir:../inference
-o Global.infer_imgs:../dataset/Aliproduct/demo_test/
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:MobileNetV3_large_x1_0_PACT
cpp_infer_type:cls
cls_inference_model_dir:./MobileNetV3_large_x1_0_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/MobileNetV3_large_x1_0_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:MobileNetV3_large_x1_0_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/MobileNetV3_large_x1_0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_serving/
--serving_client:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:MobileNetV3_large_x1_0_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/MobileNetV3_large_x1_0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_serving/
--serving_client:./deploy/paddleserving/MobileNetV3_large_x1_0_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
...@@ -3,7 +3,7 @@ model_name:MobileNetV3_large_x1_0 ...@@ -3,7 +3,7 @@ model_name:MobileNetV3_large_x1_0
python:python3.7 python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
-o Global.device:gpu -o Global.device:gpu
-o Global.auto_cast:amp -o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120 -o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/ -o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8 -o DataLoader.Train.sampler.batch_size:8
...@@ -12,16 +12,16 @@ train_model_name:latest ...@@ -12,16 +12,16 @@ train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:norm_train|pact_train|fpgm_train trainer:amp_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False amp_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False pact_train:null
fpgm_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_p ...@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_p
distill_export:null distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./inference kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./inference
export2:null export2:null
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/whole_chain/MobileNetV3_large_x1_0_inference.tar pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/MobileNetV3_large_x1_0_pretrained.pdparams
infer_model:../inference/ infer_model:../inference/
infer_export:null infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
null:null null:null
===========================train_params===========================
model_name:MobileNetV3_large_x1_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/MobileNetV3_large_x1_0_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/MobileNetV3_large_x1_0_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
null:null
===========================train_benchmark_params==========================
batch_size:256|640
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:MobileNetV3_large_x1_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
fpgm_train:tools/train.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml
quant_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml
fpgm_export:tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_prune.yaml
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./MobileNetV3_large_x1_0_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/MobileNetV3_large_x1_0_infer.tar
infer_model:./MobileNetV3_large_x1_0_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
batch_size:256|640
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_KL
cpp_infer_type:cls
cls_inference_model_dir:./general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_kl_quant_serving/
--serving_client:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/general_PPLCNet_x2_5_lite_v1.0_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_kl_quant_serving/
--serving_client:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_PACT
cpp_infer_type:cls
cls_inference_model_dir:./general_PPLCNet_x2_5_lite_v1.0_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/general_PPLCNet_x2_5_lite_v1.0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_pact_serving/
--serving_client:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:GeneralRecognition_PPLCNet_x2_5_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/general_PPLCNet_x2_5_lite_v1.0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/general_PPLCNet_x2_5_lite_v1.0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_pact_serving/
--serving_client:./deploy/paddleserving/GeneralRecognition_PPLCNet_x2_5_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:PPHGNet_small_KL
cpp_infer_type:cls
cls_inference_model_dir:./PPHGNet_small_kl_quant_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_kl_quant_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPHGNet_small_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPHGNet_small_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPHGNet_small_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPHGNet_small_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPHGNet_small_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPHGNet_small_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPHGNet_small_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPHGNet_small_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:PPHGNet_small_PACT
cpp_infer_type:cls
cls_inference_model_dir:./PPHGNet_small_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPHGNet_small_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPHGNet_small_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPHGNet_small_pact_serving/
--serving_client:./deploy/paddleserving/PPHGNet_small_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPHGNet_small_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPHGNet_small_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPHGNet_small_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPHGNet_small_pact_serving/
--serving_client:./deploy/paddleserving/PPHGNet_small_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================train_params===========================
model_name:PPHGNet_small
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_small_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:6
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================train_params===========================
model_name:PPHGNet_small
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/PPHGNet_small_pretrained" -o AMP=None
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_small_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
===========================train_params===========================
model_name:PPHGNet_small
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml -o Global.save_inference_dir=./PPHGNet_small_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet_small_infer.tar
infer_model:./PPHGNet_small_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
===========================train_params===========================
model_name:PPHGNet_tiny
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_tiny_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:6
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================train_params===========================
model_name:PPHGNet_tiny
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/PPHGNet_tiny_pretrained" -o AMP=None
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_tiny_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
===========================train_params===========================
model_name:PPHGNet_tiny
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_tiny.yaml -o Global.save_inference_dir=./PPHGNet_tiny_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet_tiny_infer.tar
infer_model:./PPHGNet_tiny_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x0_25
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_25_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_25_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x0_25
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_25.yaml -o Global.save_inference_dir=./PPLCNet_x0_25_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_25_infer.tar
infer_model:./PPLCNet_x0_25_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x0_35
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_35_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_35_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x0_35
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_35.yaml -o Global.save_inference_dir=./PPLCNet_x0_35_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_35_infer.tar
infer_model:./PPLCNet_x0_35_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x0_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x0_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_5.yaml -o Global.save_inference_dir=./PPLCNet_x0_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_5_infer.tar
infer_model:./PPLCNet_x0_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x0_75
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x0_75_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_75_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x0_75
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x0_75.yaml -o Global.save_inference_dir=./PPLCNet_x0_75_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_75_infer.tar
infer_model:./PPLCNet_x0_75_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:PPLCNet_x1_0_KL
cpp_infer_type:cls
cls_inference_model_dir:./PPLCNet_x1_0_kl_quant_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_kl_quant_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPLCNet_x1_0_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPLCNet_x1_0_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPLCNet_x1_0_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:PPLCNet_x1_0_PACT
cpp_infer_type:cls
cls_inference_model_dir:./PPLCNet_x1_0_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPLCNet_x1_0_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNet_x1_0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNet_x1_0_pact_serving/
--serving_client:./deploy/paddleserving/PPLCNet_x1_0_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPLCNet_x1_0_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNet_x1_0_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNet_x1_0_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNet_x1_0_pact_serving/
--serving_client:./deploy/paddleserving/PPLCNet_x1_0_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x1_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x1_0_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x1_0_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x1_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml -o Global.save_inference_dir=./PPLCNet_x1_0_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x1_0_infer.tar
infer_model:./PPLCNet_x1_0_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x1_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x1_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x1_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x1_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_5.yaml -o Global.save_inference_dir=./PPLCNet_x1_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x1_5_infer.tar
infer_model:./PPLCNet_x1_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x2_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x2_0_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x2_0_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x2_0
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_0.yaml -o Global.save_inference_dir=./PPLCNet_x2_0_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x2_0_infer.tar
infer_model:./PPLCNet_x2_0_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -3,7 +3,7 @@ model_name:PPLCNet_x2_5 ...@@ -3,7 +3,7 @@ model_name:PPLCNet_x2_5
python:python3.7 python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
-o Global.device:gpu -o Global.device:gpu
-o Global.auto_cast:amp -o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120 -o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/ -o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8 -o DataLoader.Train.sampler.batch_size:8
...@@ -12,16 +12,16 @@ train_model_name:latest ...@@ -12,16 +12,16 @@ train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:norm_train trainer:amp_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,13 +39,13 @@ infer_export:True ...@@ -39,13 +39,13 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
===========================train_params===========================
model_name:PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNet_x2_5_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x2_5_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:PPLCNet_x2_5
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x2_5.yaml -o Global.save_inference_dir=./PPLCNet_x2_5_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x2_5_infer.tar
infer_model:./PPLCNet_x2_5_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:PPLCNetV2_base_KL
cpp_infer_type:cls
cls_inference_model_dir:./PPLCNetV2_base_kl_quant_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_kl_quant_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPLCNetV2_base_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNetV2_base_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNetV2_base_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPLCNetV2_base_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPLCNetV2_base_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNetV2_base_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNetV2_base_kl_quant_serving/
--serving_client:./deploy/paddleserving/PPLCNetV2_base_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:PPLCNetV2_base_PACT
cpp_infer_type:cls
cls_inference_model_dir:./PPLCNetV2_base_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:PPLCNetV2_base_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNetV2_base_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNetV2_base_pact_serving/
--serving_client:./deploy/paddleserving/PPLCNetV2_base_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:PPLCNetV2_base_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/PPLCNetV2_base_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/PPLCNetV2_base_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/PPLCNetV2_base_pact_serving/
--serving_client:./deploy/paddleserving/PPLCNetV2_base_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================train_params===========================
model_name:PPLCNetV2_base
python:python3.7
gpu_list:0|0,1
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:null
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNetV2_base_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:6
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================train_params===========================
model_name:PPLCNetV2_base
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.first_bs:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.08 -o Global.pretrained_model="pretrained_model/PPLCNetV2_base_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNetV2_base_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
===========================train_params===========================
model_name:PPLCNetV2_base
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.first_bs:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.seed=1234 -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/PPLCNetV2/PPLCNetV2_base.yaml -o Global.save_inference_dir=./PPLCNetV2_base_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNetV2_base_infer.tar
infer_model:./PPLCNetV2_base_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_amp_O1.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
to_static_train:-o Global.to_static=True to_static_train:-o Global.to_static=True
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,15 +39,15 @@ infer_export:True ...@@ -39,15 +39,15 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
null:null null:null
===========================train_benchmark_params========================== ===========================train_benchmark_params==========================
......
===========================train_params===========================
model_name:ResNet50
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/ResNet50_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/ResNet50_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
null:null
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:ResNet50
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=200
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml -o Global.save_inference_dir=./ResNet50_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/ResNet50_infer.tar
infer_model:./ResNet50_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:ResNet50_vd_PACT
cpp_infer_type:cls
cls_inference_model_dir:./ResNet50_vd_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/ResNet50_vd_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:ResNet50_vd_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/ResNet50_vd_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/ResNet50_vd_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/ResNet50_vd_pact_serving/
--serving_client:./deploy/paddleserving/ResNet50_vd_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:ResNet50_vd_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/ResNet50_vd_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/ResNet50_vd_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/ResNet50_vd_pact_serving/
--serving_client:./deploy/paddleserving/ResNet50_vd_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
...@@ -3,7 +3,7 @@ model_name:ResNet50_vd ...@@ -3,7 +3,7 @@ model_name:ResNet50_vd
python:python3.7 python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
-o Global.device:gpu -o Global.device:gpu
-o Global.auto_cast:amp -o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120 -o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/ -o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8 -o DataLoader.Train.sampler.batch_size:8
...@@ -12,16 +12,16 @@ train_model_name:latest ...@@ -12,16 +12,16 @@ train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:norm_train|pact_train|fpgm_train trainer:amp_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False amp_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:tools/train.py -c ppcls/configs/slim/ResNet50_vd_quantization.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False pact_train:null
fpgm_train:tools/train.py -c ppcls/configs/slim/ResNet50_vd_prune.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/ResNet50_vd_prune.yaml ...@@ -33,20 +33,20 @@ fpgm_export:tools/export_model.py -c ppcls/configs/slim/ResNet50_vd_prune.yaml
distill_export:null distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.save_inference_dir=./inference kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.save_inference_dir=./inference
export2:null export2:null
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/whole_chain/ResNet50_vd_inference.tar pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/ResNet50_vd_pretrained.pdparams
infer_model:../inference/ infer_model:../inference/
infer_export:null infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
null:null null:null
===========================train_params===========================
model_name:ResNet50_vd
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=200
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/ResNet50_vd_pretrained"
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/ResNet50_vd_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
null:null
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:ResNet50_vd
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=200
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
to_static_train:-o Global.to_static=True
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/ResNet/ResNet50_vd.yaml -o Global.save_inference_dir=./ResNet50_vd_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/ResNet50_vd_infer.tar
infer_model:./ResNet50_vd_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================cpp_infer_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_KL
cpp_infer_type:cls
cls_inference_model_dir:./SwinTransformer_tiny_patch4_window7_224_kl_quant_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_kl_quant_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_serving/
--serving_client:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_KL
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_kl_quant_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_serving/
--serving_client:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_kl_quant_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
===========================cpp_infer_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_PACT
cpp_infer_type:cls
cls_inference_model_dir:./SwinTransformer_tiny_patch4_window7_224_pact_infer/
det_inference_model_dir:
cls_inference_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_pact_infer.tar
det_inference_url:
infer_quant:False
inference_cmd:./deploy/cpp/build/clas_system -c inference_cls.yaml
use_gpu:True|False
enable_mkldnn:False
cpu_threads:1
batch_size:1
use_tensorrt:False
precision:fp32
image_dir:./dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG
benchmark:False
generate_yaml_cmd:python3.7 test_tipc/generate_cpp_yaml.py
===========================serving_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_serving/
--serving_client:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_client/
serving_dir:./deploy/paddleserving
web_service:null
--use_gpu:0|null
pipline:test_cpp_serving_client.py
===========================serving_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224_PACT
python:python3.7
inference_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/slim_model/SwinTransformer_tiny_patch4_window7_224_pact_infer.tar
trans_model:-m paddle_serving_client.convert
--dirname:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--serving_server:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_serving/
--serving_client:./deploy/paddleserving/SwinTransformer_tiny_patch4_window7_224_pact_client/
serving_dir:./deploy/paddleserving
web_service:classification_web_service.py
--use_gpu:0|null
pipline:pipeline_http_client.py
...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val ...@@ -13,15 +13,15 @@ train_infer_img_dir:./dataset/ILSVRC2012/val
null:null null:null
## ##
trainer:amp_train trainer:amp_train
amp_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 amp_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2 -o Optimizer.multi_precision=True
pact_train:null pact_train:null
fpgm_train:null fpgm_train:null
distill_train:null distill_train:null
null:null null:null
null:null null:null
## ##
===========================eval_params=========================== ===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o AMP.scale_loss=65536 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2
null:null null:null
## ##
===========================infer_params========================== ===========================infer_params==========================
...@@ -39,14 +39,14 @@ infer_export:True ...@@ -39,14 +39,14 @@ infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:6
-o Global.batch_size:1|16 -o Global.batch_size:1
-o Global.use_tensorrt:True|False -o Global.use_tensorrt:False
-o Global.use_fp16:True|False -o Global.use_fp16:False
-o Global.inference_model_dir:../inference -o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val -o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null -o Global.save_log_path:null
-o Global.benchmark:True -o Global.benchmark:False
null:null null:null
null:null null:null
===========================train_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:pact_train
norm_train:null
pact_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.pretrained_model="pretrained_model/SwinTransformer_tiny_patch4_window7_224_pretrained"
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Slim.quant.name=pact
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:null
quant_export:tools/export_model.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Slim.quant.name=pact
fpgm_export:null
distill_export:null
kl_quant:null
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SwinTransformer_tiny_patch4_window7_224_pretrained.pdparams
infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../dataset/ILSVRC2012/val
-o Global.save_log_path:null
-o Global.benchmark:True
null:null
null:null
===========================train_benchmark_params==========================
batch_size:64|104
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
===========================train_params===========================
model_name:SwinTransformer_tiny_patch4_window7_224
python:python3.7
gpu_list:0
-o Global.device:gpu
-o Global.auto_cast:null
-o Global.epochs:lite_train_lite_infer=2|whole_train_whole_infer=120
-o Global.output_dir:./output/
-o DataLoader.Train.sampler.batch_size:8
-o Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./dataset/ILSVRC2012/val
null:null
##
trainer:norm_train
norm_train:tools/train.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False
pact_train:null
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:tools/eval.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml
null:null
##
===========================infer_params==========================
-o Global.save_inference_dir:./inference
-o Global.pretrained_model:
norm_export:tools/export_model.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml
quant_export:null
fpgm_export:null
distill_export:null
kl_quant:deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml -o Global.save_inference_dir=./SwinTransformer_tiny_patch4_window7_224_infer
export2:null
pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/SwinTransformer_tiny_patch4_window7_224_infer.tar
infer_model:./SwinTransformer_tiny_patch4_window7_224_infer/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
-o Global.infer_imgs:../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg
-o Global.save_log_path:null
-o Global.benchmark:False
null:null
null:null
===========================train_benchmark_params==========================
batch_size:64|104
fp_items:fp32
epoch:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,224,224]}]
\ No newline at end of file
...@@ -6,27 +6,37 @@ Linux GPU/CPU C++ 推理功能测试的主程序为`test_inference_cpp.sh`,可 ...@@ -6,27 +6,37 @@ Linux GPU/CPU C++ 推理功能测试的主程序为`test_inference_cpp.sh`,可
- 推理相关: - 推理相关:
| 算法名称 | 模型名称 | device_CPU | device_GPU | | 算法名称 | 模型名称 | device_CPU | device_GPU |
| :-------------: | :---------------------------------------: | :--------: | :--------: | | :-------------: | :------------------------------------------: | :--------: | :--------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 |
| MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 |
| PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_PACT | 支持 | 支持 |
| PP-ShiTu | PPShiTu_mainbody_det | 支持 | 支持 | | PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 |
| PPHGNet | PPHGNet_small | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_KL | 支持 | 支持 |
| PPHGNet | PPHGNet_tiny | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_25 | 支持 | 支持 | | PPHGNet | PPHGNet_small | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_35 | 支持 | 支持 | | PPHGNet | PPHGNet_small_KL | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_5 | 支持 | 支持 | | PPHGNet | PPHGNet_small_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_75 | 支持 | 支持 | | PPHGNet | PPHGNet_tiny | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_0 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_25 | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_35 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_5 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_75 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0 | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_KL | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_PACT | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 | | PPLCNet | PPLCNet_x1_5 | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 | | PPLCNet | PPLCNet_x2_0 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base_KL | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 |
| ResNet | ResNet50_vd_PACT | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_KL | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_PACT | 支持 | 支持 |
## 2. 测试流程(以**ResNet50**为例) ## 2. 测试流程(以**ResNet50**为例)
...@@ -244,20 +254,20 @@ bash test_tipc/prepare.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_norm ...@@ -244,20 +254,20 @@ bash test_tipc/prepare.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_norm
测试方法如下所示,希望测试不同的模型文件,只需更换为自己的参数配置文件,即可完成对应模型的测试。 测试方法如下所示,希望测试不同的模型文件,只需更换为自己的参数配置文件,即可完成对应模型的测试。
```shell ```shell
bash test_tipc/test_inference_cpp.sh ${your_params_file} bash test_tipc/test_inference_cpp.sh ${your_params_file} cpp_infer
``` ```
`ResNet50``Linux GPU/CPU C++推理测试`为例,命令如下所示。 `ResNet50``Linux GPU/CPU C++推理测试`为例,命令如下所示。
```shell ```shell
bash test_tipc/test_inference_cpp.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt bash test_tipc/test_inference_cpp.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt cpp_infer
``` ```
输出结果如下,表示命令运行成功。 输出结果如下,表示命令运行成功。
```shell ```shell
Run successfully with command - ./deploy/cpp/build/clas_system -c inference_cls.yaml > ./test_tipc/output/ResNet50/cls_cpp_infer_gpu_usetrt_False_precision_fp32_batchsize_1.log 2>&1! Run successfully with command - ResNet50 - ./deploy/cpp/build/clas_system -c inference_cls.yaml > ./test_tipc/output/ResNet50/cpp_infer/cpp_infer_gpu_usetrt_False_precision_fp32_batchsize_1.log 2>&1!
Run successfully with command - ./deploy/cpp/build/clas_system -c inference_cls.yaml > ./test_tipc/output/ResNet50/cls_cpp_infer_cpu_usemkldnn_False_threads_1_precision_fp32_batchsize_1.log 2>&1! Run successfully with command - ResNet50 - ./deploy/cpp/build/clas_system -c inference_cls.yaml > ./test_tipc/output/ResNet50/cpp_infer/cpp_infer_cpu_usemkldnn_False_threads_1_precision_fp32_batchsize_1.log 2>&1!
``` ```
最终log中会打印出结果,如下所示 最终log中会打印出结果,如下所示
...@@ -308,6 +318,6 @@ Current total inferen time cost: 5449.39 ms. ...@@ -308,6 +318,6 @@ Current total inferen time cost: 5449.39 ms.
Top5: class_id: 265, score: 0.0420, label: toy poodle Top5: class_id: 265, score: 0.0420, label: toy poodle
``` ```
详细log位于`./test_tipc/output/ResNet50/cls_cpp_infer_gpu_usetrt_False_precision_fp32_batchsize_1.log``./test_tipc/output/ResNet50/cls_cpp_infer_cpu_usemkldnn_False_threads_1_precision_fp32_batchsize_1.log`中。 详细log位于`./test_tipc/output/ResNet50/cpp_infer/cpp_infer_gpu_usetrt_False_precision_fp32_batchsize_1.log``./test_tipc/output/ResNet50/cpp_infer_cpu_usemkldnn_False_threads_1_precision_fp32_batchsize_1.log`中。
如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。 如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。
...@@ -7,26 +7,37 @@ Linux GPU/CPU C++ 服务化部署测试的主程序为`test_serving_infer_cpp.sh ...@@ -7,26 +7,37 @@ Linux GPU/CPU C++ 服务化部署测试的主程序为`test_serving_infer_cpp.sh
- 推理相关: - 推理相关:
| 算法名称 | 模型名称 | device_CPU | device_GPU | | 算法名称 | 模型名称 | device_CPU | device_GPU |
| :-------------: | :---------------------------------------: | :--------: | :--------: | | :-------------: | :------------------------------------------: | :--------: | :--------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 |
| MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 |
| PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_PACT | 支持 | 支持 |
| PPHGNet | PPHGNet_small | 支持 | 支持 | | PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 |
| PPHGNet | PPHGNet_tiny | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_KL | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_25 | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_35 | 支持 | 支持 | | PPHGNet | PPHGNet_small | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_5 | 支持 | 支持 | | PPHGNet | PPHGNet_small_KL | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_75 | 支持 | 支持 | | PPHGNet | PPHGNet_small_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_0 | 支持 | 支持 | | PPHGNet | PPHGNet_tiny | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_25 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_35 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_5 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 | | PPLCNet | PPLCNet_x0_75 | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0 | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_KL | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_PACT | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 | | PPLCNet | PPLCNet_x1_5 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base_KL | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 |
| ResNet | ResNet50_vd_PACT | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_KL | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_PACT | 支持 | 支持 |
## 2. 测试流程 ## 2. 测试流程
......
...@@ -7,26 +7,37 @@ Linux GPU/CPU PYTHON 服务化部署测试的主程序为`test_serving_infer_pyt ...@@ -7,26 +7,37 @@ Linux GPU/CPU PYTHON 服务化部署测试的主程序为`test_serving_infer_pyt
- 推理相关: - 推理相关:
| 算法名称 | 模型名称 | device_CPU | device_GPU | | 算法名称 | 模型名称 | device_CPU | device_GPU |
| :-------------: | :---------------------------------------: | :--------: | :--------: | | :-------------: | :------------------------------------------: | :--------: | :--------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 |
| MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_KL | 支持 | 支持 |
| PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 | | MobileNetV3 | MobileNetV3_large_x1_0_PACT | 支持 | 支持 |
| PPHGNet | PPHGNet_small | 支持 | 支持 | | PP-ShiTu | PPShiTu_general_rec、PPShiTu_mainbody_det | 支持 | 支持 |
| PPHGNet | PPHGNet_tiny | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_KL | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_25 | 支持 | 支持 | | PP-ShiTu | GeneralRecognition_PPLCNet_x2_5_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_35 | 支持 | 支持 | | PPHGNet | PPHGNet_small | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_5 | 支持 | 支持 | | PPHGNet | PPHGNet_small_KL | 支持 | 支持 |
| PPLCNet | PPLCNet_x0_75 | 支持 | 支持 | | PPHGNet | PPHGNet_small_PACT | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_0 | 支持 | 支持 | | PPHGNet | PPHGNet_tiny | 支持 | 支持 |
| PPLCNet | PPLCNet_x1_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_25 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_35 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 | | PPLCNet | PPLCNet_x0_5 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 | | PPLCNet | PPLCNet_x0_75 | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0 | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_KL | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 | | PPLCNet | PPLCNet_x1_0_PACT | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 | | PPLCNet | PPLCNet_x1_5 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 |
| PPLCNetV2 | PPLCNetV2_base_KL | 支持 | 支持 |
| ResNet | ResNet50 | 支持 | 支持 |
| ResNet | ResNet50_vd | 支持 | 支持 |
| ResNet | ResNet50_vd_KL | 支持 | 支持 |
| ResNet | ResNet50_vd_PACT | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_KL | 支持 | 支持 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224_PACT | 支持 | 支持 |
## 2. 测试流程 ## 2. 测试流程
......
# Linux GPU/CPU PACT量化训练推理测试
Linux GPU/CPU PACT量化训练推理测试的主程序为`test_train_inference_python.sh`,可以测试基于Python的模型PACT在线量化等基本功能。
## 1. 测试结论汇总
- 训练相关:
| 算法名称 | 模型名称 | 单机单卡 |
| :-------------: | :-------------------------------------: | :----------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | PACT量化训练 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | PACT量化训练 |
| PPHGNet | PPHGNet_small | PACT量化训练 |
| PPHGNet | PPHGNet_tiny | PACT量化训练 |
| PPLCNet | PPLCNet_x0_25 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_35 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_5 | PACT量化训练 |
| PPLCNet | PPLCNet_x0_75 | PACT量化训练 |
| PPLCNet | PPLCNet_x1_0 | PACT量化训练 |
| PPLCNet | PPLCNet_x1_5 | PACT量化训练 |
| PPLCNet | PPLCNet_x2_0 | PACT量化训练 |
| PPLCNet | PPLCNet_x2_5 | PACT量化训练 |
| PPLCNetV2 | PPLCNetV2_base | PACT量化训练 |
| ResNet | ResNet50 | PACT量化训练 |
| ResNet | ResNet50_vd | PACT量化训练 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | PACT量化训练 |
- 推理相关:
| 算法名称 | 模型名称 | device_CPU | device_GPU | batchsize |
| :-------------: | :-------------------------------------: | :--------: | :--------: | :-------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | 支持 | 支持 | 1 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | 支持 | 支持 | 1 |
| PPHGNet | PPHGNet_small | 支持 | 支持 | 1 |
| PPHGNet | PPHGNet_tiny | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_25 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_35 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_5 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x0_75 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x1_0 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x1_5 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x2_0 | 支持 | 支持 | 1 |
| PPLCNet | PPLCNet_x2_5 | 支持 | 支持 | 1 |
| PPLCNetV2 | PPLCNetV2_base | 支持 | 支持 | 1 |
| ResNet | ResNet50 | 支持 | 支持 | 1 |
| ResNet | ResNet50_vd | 支持 | 支持 | 1 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | 支持 | 支持 | 1 |
## 2. 测试流程
一下测试流程以 MobileNetV3_large_x1_0 模型为例。
### 2.1 准备环境
- 安装PaddlePaddle:如果您已经安装了2.2或者以上版本的paddlepaddle,那么无需运行下面的命令安装paddlepaddle。
```bash
# 需要安装2.2及以上版本的Paddle
# 安装GPU版本的Paddle
python3.7 -m pip install paddlepaddle-gpu==2.2.0
# 安装CPU版本的Paddle
python3.7 -m pip install paddlepaddle==2.2.0
```
- 安装PaddleSlim
```bash
python3.7 -m pip install paddleslim==2.2.0
```
- 安装依赖
```bash
python3.7 -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
```
- 安装AutoLog(规范化日志输出工具)
```bash
python3.7 -m pip install https://paddleocr.bj.bcebos.com/libs/auto_log-1.2.0-py3-none-any.whl
```
### 2.2 准备数据和模型
```bash
bash test_tipc/prepare.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
在线量化的操作流程,可参考[文档](../../deploy/slim/README.md)
### 2.3 功能测试
`MobileNetV3_large_x1_0``Linux GPU/CPU PACT在线量化训练推理测试`为例,命令如下所示。
```bash
bash test_tipc/test_train_inference_python.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
输出结果如下,表示命令运行成功。
```log
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/train.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.seed=1234 -o DataLoader.Train.sampler.shuffle=False -o DataLoader.Train.loader.num_workers=0 -o DataLoader.Train.loader.use_shared_memory=False -o Slim.quant.name=pact -o Optimizer.lr.learning_rate=0.01 -o Global.device=gpu -o Global.output_dir=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.epochs=2 -o DataLoader.Train.sampler.batch_size=8 !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/eval.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Slim.quant.name=pact -o Global.pretrained_model=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null/MobileNetV3_large_x1_0/latest -o Global.device=gpu !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 tools/export_model.py -c ppcls/configs/slim/MobileNetV3_large_x1_0_quantization.yaml -o Slim.quant.name=pact -o Global.pretrained_model=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null/MobileNetV3_large_x1_0/latest -o Global.save_inference_dir=./test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null!
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=True -o Global.use_tensorrt=False -o Global.use_fp16=False -o Global.inference_model_dir=.././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.batch_size=1 -o Global.infer_imgs=../dataset/ILSVRC2012/val -o Global.benchmark=True > .././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/infer_gpu_usetrt_False_precision_False_batchsize_1.log 2>&1 !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=False -o Global.enable_mkldnn=False -o Global.cpu_num_threads=1 -o Global.inference_model_dir=.././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/pact_train_gpus_0_autocast_null -o Global.batch_size=1 -o Global.infer_imgs=../dataset/ILSVRC2012/val -o Global.benchmark=True > .././test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer/infer_cpu_usemkldnn_False_threads_1_batchsize_1.log 2>&1 !
```
同时,测试过程中的日志保存在`PaddleClas/test_tipc/output/MobileNetV3_large_x1_0/lite_train_lite_infer`下。
如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。
# Linux GPU/CPU KL离线量化推理测试
Linux GPU/CPU KL离线量化推理测试的主程序为`test_ptq_inference_python.sh`,可以测试基于Python的模型KL离线量化推理等基本功能。
## 1. 测试结论汇总
- KL离线量化:
| 算法名称 | 模型名称 | CPU |
| :-------------: | :-------------------------------------: | :----------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | KL离线量化 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | KL离线量化 |
| PPHGNet | PPHGNet_small | KL离线量化 |
| PPHGNet | PPHGNet_tiny | KL离线量化 |
| PPLCNet | PPLCNet_x0_25 | KL离线量化 |
| PPLCNet | PPLCNet_x0_35 | KL离线量化 |
| PPLCNet | PPLCNet_x0_5 | KL离线量化 |
| PPLCNet | PPLCNet_x0_75 | KL离线量化 |
| PPLCNet | PPLCNet_x1_0 | KL离线量化 |
| PPLCNet | PPLCNet_x1_5 | KL离线量化 |
| PPLCNet | PPLCNet_x2_0 | KL离线量化 |
| PPLCNet | PPLCNet_x2_5 | KL离线量化 |
| PPLCNetV2 | PPLCNetV2_base | KL离线量化 |
| ResNet | ResNet50 | KL离线量化 |
| ResNet | ResNet50_vd | KL离线量化 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | KL离线量化 |
- 推理相关:
| 算法名称 | 模型名称 | CPU |
| :-------------: | :-------------------------------------: | :----------: |
| MobileNetV3 | MobileNetV3_large_x1_0 | KL离线量化 |
| PP-ShiTu | GeneralRecognition_PPLCNet_x2_5 | KL离线量化 |
| PPHGNet | PPHGNet_small | KL离线量化 |
| PPHGNet | PPHGNet_tiny | KL离线量化 |
| PPLCNet | PPLCNet_x0_25 | KL离线量化 |
| PPLCNet | PPLCNet_x0_35 | KL离线量化 |
| PPLCNet | PPLCNet_x0_5 | KL离线量化 |
| PPLCNet | PPLCNet_x0_75 | KL离线量化 |
| PPLCNet | PPLCNet_x1_0 | KL离线量化 |
| PPLCNet | PPLCNet_x1_5 | KL离线量化 |
| PPLCNet | PPLCNet_x2_0 | KL离线量化 |
| PPLCNet | PPLCNet_x2_5 | KL离线量化 |
| PPLCNetV2 | PPLCNetV2_base | KL离线量化 |
| ResNet | ResNet50 | KL离线量化 |
| ResNet | ResNet50_vd | KL离线量化 |
| SwinTransformer | SwinTransformer_tiny_patch4_window7_224 | KL离线量化 |
## 2. 测试流程
一下测试流程以 MobileNetV3_large_x1_0 模型为例。
### 2.1 准备环境
- 安装PaddlePaddle:如果您已经安装了2.2或者以上版本的paddlepaddle,那么无需运行下面的命令安装paddlepaddle。
```bash
# 需要安装2.2及以上版本的Paddle
# 安装GPU版本的Paddle
python3.7 -m pip install paddlepaddle-gpu==2.2.0
# 安装CPU版本的Paddle
python3.7 -m pip install paddlepaddle==2.2.0
```
- 安装PaddleSlim
```bash
python3.7 -m pip install paddleslim==2.2.0
```
- 安装依赖
```bash
python3.7 -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
```
- 安装AutoLog(规范化日志输出工具)
```bash
python3.7 -m pip install https://paddleocr.bj.bcebos.com/libs/auto_log-1.2.0-py3-none-any.whl
```
### 2.2 准备数据和模型
```bash
bash test_tipc/prepare.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
```
离线量化的操作流程,可参考[文档](../../deploy/slim/README.md)
### 2.3 功能测试
`MobileNetV3_large_x1_0``Linux GPU/CPU KL离线量化训练推理测试`为例,命令如下所示。
```bash
bash test_tipc/test_ptq_inference_python.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
```
输出结果如下,表示命令运行成功。
```log
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 deploy/slim/quant_post_static.py -c ppcls/configs/ImageNet/MobileNetV3/MobileNetV3_large_x1_0.yaml -o Global.save_inference_dir=./MobileNetV3_large_x1_0_infer!
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=True -o Global.use_tensorrt=False -o Global.use_fp16=False -o Global.inference_model_dir=.././MobileNetV3_large_x1_0_infer//quant_post_static_model -o Global.batch_size=1 -o Global.infer_imgs=../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg -o Global.benchmark=False > .././test_tipc/output/MobileNetV3_large_x1_0/whole_infer/infer_gpu_usetrt_False_precision_False_batchsize_1.log 2>&1 !
Run successfully with command - MobileNetV3_large_x1_0 - python3.7 python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu=False -o Global.enable_mkldnn=False -o Global.cpu_num_threads=1 -o Global.inference_model_dir=.././MobileNetV3_large_x1_0_infer//quant_post_static_model -o Global.batch_size=1 -o Global.infer_imgs=../deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg -o Global.benchmark=False > .././test_tipc/output/MobileNetV3_large_x1_0/whole_infer/infer_cpu_usemkldnn_False_threads_1_batchsize_1.log 2>&1 !
```
同时,测试过程中的日志保存在`PaddleClas/test_tipc/output/MobileNetV3_large_x1_0/whole_infer`下。
如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
FILENAME=$1 FILENAME=$1
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', # MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer',
# 'whole_infer', 'klquant_whole_infer', # 'whole_infer', 'cpp_infer', 'serving_infer', 'lite_infer']
# 'cpp_infer', 'serving_infer', 'lite_infer']
MODE=$2 MODE=$2
...@@ -85,7 +84,12 @@ if [[ ${MODE} = "cpp_infer" ]]; then ...@@ -85,7 +84,12 @@ if [[ ${MODE} = "cpp_infer" ]]; then
fi fi
if [[ ! -d "./deploy/cpp/paddle_inference/" ]]; then if [[ ! -d "./deploy/cpp/paddle_inference/" ]]; then
pushd ./deploy/cpp/ pushd ./deploy/cpp/
wget -nc https://paddle-inference-lib.bj.bcebos.com/2.2.2/cxx_c/Linux/GPU/x86-64_gcc8.2_avx_mkl_cuda10.1_cudnn7.6.5_trt6.0.1.5/paddle_inference.tgz PADDLEInfer=$3
if [ "" = "$PADDLEInfer" ];then
wget -nc https://paddle-inference-lib.bj.bcebos.com/2.2.2/cxx_c/Linux/GPU/x86-64_gcc8.2_avx_mkl_cuda10.1_cudnn7.6.5_trt6.0.1.5/paddle_inference.tgz --no-check-certificate
else
wget -nc ${PADDLEInfer} --no-check-certificate
fi
tar xf paddle_inference.tgz tar xf paddle_inference.tgz
popd popd
fi fi
...@@ -98,7 +102,17 @@ if [[ ${MODE} = "cpp_infer" ]]; then ...@@ -98,7 +102,17 @@ if [[ ${MODE} = "cpp_infer" ]]; then
if [[ $cpp_type == "cls" ]]; then if [[ $cpp_type == "cls" ]]; then
eval "wget -nc $cls_inference_url" eval "wget -nc $cls_inference_url"
tar xf "${model_name}_infer.tar" tar_name=$(func_get_url_file_name "$cls_inference_url")
model_dir=${tar_name%.*}
eval "tar xf ${tar_name}"
# move '_int8' suffix in pact models
if [[ ${tar_name} =~ "pact_infer" ]]; then
cd ${cls_inference_model_dir}
mv inference_int8.pdiparams inference.pdiparams
mv inference_int8.pdmodel inference.pdmodel
cd ..
fi
cd dataset cd dataset
rm -rf ILSVRC2012 rm -rf ILSVRC2012
...@@ -134,7 +148,7 @@ model_name=$(func_parser_value "${lines[1]}") ...@@ -134,7 +148,7 @@ model_name=$(func_parser_value "${lines[1]}")
model_url_value=$(func_parser_value "${lines[35]}") model_url_value=$(func_parser_value "${lines[35]}")
model_url_key=$(func_parser_key "${lines[35]}") model_url_key=$(func_parser_key "${lines[35]}")
if [[ $FILENAME == *GeneralRecognition* ]]; then if [[ $model_name == *ShiTu* ]]; then
cd dataset cd dataset
rm -rf Aliproduct rm -rf Aliproduct
rm -rf train_reg_all_data.txt rm -rf train_reg_all_data.txt
...@@ -169,22 +183,47 @@ if [[ ${MODE} = "lite_train_lite_infer" ]] || [[ ${MODE} = "lite_train_whole_inf ...@@ -169,22 +183,47 @@ if [[ ${MODE} = "lite_train_lite_infer" ]] || [[ ${MODE} = "lite_train_whole_inf
mv val.txt val_list.txt mv val.txt val_list.txt
cp -r train/* val/ cp -r train/* val/
cd ../../ cd ../../
elif [[ ${MODE} = "whole_infer" ]] || [[ ${MODE} = "klquant_whole_infer" ]]; then if [[ ${FILENAME} =~ "pact_infer" ]]; then
# download pretrained model for PACT training
pretrpretrained_model_url=$(func_parser_value "${lines[35]}")
mkdir pretrained_model
cd pretrained_model
wget -nc ${pretrpretrained_model_url} --no-check-certificate
cd ..
fi
elif [[ ${MODE} = "whole_infer" ]]; then
# download data # download data
cd dataset if [[ ${model_name} =~ "GeneralRecognition" ]]; then
rm -rf ILSVRC2012 cd dataset
wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/whole_chain_infer.tar rm -rf Aliproduct
tar xf whole_chain_infer.tar rm -rf train_reg_all_data.txt
ln -s whole_chain_infer ILSVRC2012 rm -rf demo_train
cd ILSVRC2012 wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/tipc_shitu_demo_data.tar --no-check-certificate
mv val.txt val_list.txt tar -xf tipc_shitu_demo_data.tar
ln -s val_list.txt train_list.txt ln -s tipc_shitu_demo_data Aliproduct
cd ../../ ln -s tipc_shitu_demo_data/demo_train.txt train_reg_all_data.txt
ln -s tipc_shitu_demo_data/demo_train demo_train
cd tipc_shitu_demo_data
ln -s demo_test.txt val_list.txt
cd ../../
else
cd dataset
rm -rf ILSVRC2012
wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/whole_chain_infer.tar
tar xf whole_chain_infer.tar
ln -s whole_chain_infer ILSVRC2012
cd ILSVRC2012
mv val.txt val_list.txt
ln -s val_list.txt train_list.txt
cd ../../
fi
# download inference or pretrained model # download inference or pretrained model
eval "wget -nc $model_url_value" eval "wget -nc $model_url_value"
if [[ $model_url_key == *inference* ]]; then if [[ ${model_url_value} =~ ".tar" ]]; then
rm -rf inference tar_name=$(func_get_url_file_name "${model_url_value}")
tar xf "${model_name}_infer.tar" echo $tar_name
rm -rf {tar_name}
tar xf ${tar_name}
fi fi
if [[ $model_name == "SwinTransformer_large_patch4_window7_224" || $model_name == "SwinTransformer_large_patch4_window12_384" ]]; then if [[ $model_name == "SwinTransformer_large_patch4_window7_224" || $model_name == "SwinTransformer_large_patch4_window12_384" ]]; then
cmd="mv ${model_name}_22kto1k_pretrained.pdparams ${model_name}_pretrained.pdparams" cmd="mv ${model_name}_22kto1k_pretrained.pdparams ${model_name}_pretrained.pdparams"
...@@ -201,12 +240,20 @@ elif [[ ${MODE} = "whole_train_whole_infer" ]]; then ...@@ -201,12 +240,20 @@ elif [[ ${MODE} = "whole_train_whole_infer" ]]; then
mv train.txt train_list.txt mv train.txt train_list.txt
mv test.txt val_list.txt mv test.txt val_list.txt
cd ../../ cd ../../
if [[ ${FILENAME} =~ "pact_infer" ]]; then
# download pretrained model for PACT training
pretrpretrained_model_url=$(func_parser_value "${lines[35]}")
mkdir pretrained_model
cd pretrained_model
wget -nc ${pretrpretrained_model_url} --no-check-certificate
cd ..
fi
fi fi
if [[ ${MODE} = "serving_infer" ]]; then if [[ ${MODE} = "serving_infer" ]]; then
# prepare serving env # prepare serving env
python_name=$(func_parser_value "${lines[2]}") python_name=$(func_parser_value "${lines[2]}")
if [[ ${model_name} =~ "ShiTu" ]]; then if [[ ${model_name} = "PPShiTu" ]]; then
cls_inference_model_url=$(func_parser_value "${lines[3]}") cls_inference_model_url=$(func_parser_value "${lines[3]}")
cls_tar_name=$(func_get_url_file_name "${cls_inference_model_url}") cls_tar_name=$(func_get_url_file_name "${cls_inference_model_url}")
det_inference_model_url=$(func_parser_value "${lines[4]}") det_inference_model_url=$(func_parser_value "${lines[4]}")
...@@ -223,7 +270,18 @@ if [[ ${MODE} = "serving_infer" ]]; then ...@@ -223,7 +270,18 @@ if [[ ${MODE} = "serving_infer" ]]; then
cls_inference_model_url=$(func_parser_value "${lines[3]}") cls_inference_model_url=$(func_parser_value "${lines[3]}")
cls_tar_name=$(func_get_url_file_name "${cls_inference_model_url}") cls_tar_name=$(func_get_url_file_name "${cls_inference_model_url}")
cd ./deploy/paddleserving cd ./deploy/paddleserving
wget -nc ${cls_inference_model_url} && tar xf ${cls_tar_name} wget -nc ${cls_inference_model_url}
tar xf ${cls_tar_name}
# move '_int8' suffix in pact models
if [[ ${cls_tar_name} =~ "pact_infer" ]]; then
cls_inference_model_dir=${cls_tar_name%%.tar}
cd ${cls_inference_model_dir}
mv inference_int8.pdiparams inference.pdiparams
mv inference_int8.pdmodel inference.pdmodel
cd ..
fi
cd ../../ cd ../../
fi fi
unset http_proxy unset http_proxy
......
...@@ -2,10 +2,17 @@ ...@@ -2,10 +2,17 @@
source test_tipc/common_func.sh source test_tipc/common_func.sh
FILENAME=$1 FILENAME=$1
GPUID=$2 MODE=$2
# set cuda device
GPUID=$3
if [[ ! $GPUID ]];then if [[ ! $GPUID ]];then
GPUID=0 GPUID=0
fi fi
env="export CUDA_VISIBLE_DEVICES=${GPUID}"
set CUDA_VISIBLE_DEVICES
eval $env
dataline=$(awk 'NR==1, NR==19{print}' $FILENAME) dataline=$(awk 'NR==1, NR==19{print}' $FILENAME)
# parser params # parser params
...@@ -30,7 +37,7 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}") ...@@ -30,7 +37,7 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}")
generate_yaml_cmd=$(func_parser_value "${lines[17]}") generate_yaml_cmd=$(func_parser_value "${lines[17]}")
transform_index_cmd=$(func_parser_value "${lines[18]}") transform_index_cmd=$(func_parser_value "${lines[18]}")
LOG_PATH="./test_tipc/output/${model_name}" LOG_PATH="./test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH} mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_cpp.log" status_log="${LOG_PATH}/results_cpp.log"
# generate_yaml_cmd="python3 test_tipc/generate_cpp_yaml.py" # generate_yaml_cmd="python3 test_tipc/generate_cpp_yaml.py"
...@@ -56,7 +63,7 @@ function func_shitu_cpp_inference(){ ...@@ -56,7 +63,7 @@ function func_shitu_cpp_inference(){
if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then
precison="int8" precison="int8"
fi fi
_save_log_path="${_log_path}/shitu_cpp_infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_precision_${precision}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/cpp_infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_precision_${precision}_batchsize_${batch_size}.log"
eval $transform_index_cmd eval $transform_index_cmd
command="${generate_yaml_cmd} --type shitu --batch_size ${batch_size} --mkldnn ${use_mkldnn} --gpu ${use_gpu} --cpu_thread ${threads} --tensorrt False --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --det_model_dir ${cpp_det_infer_model_dir} --gpu_id ${GPUID}" command="${generate_yaml_cmd} --type shitu --batch_size ${batch_size} --mkldnn ${use_mkldnn} --gpu ${use_gpu} --cpu_thread ${threads} --tensorrt False --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --det_model_dir ${cpp_det_infer_model_dir} --gpu_id ${GPUID}"
eval $command eval $command
...@@ -80,7 +87,7 @@ function func_shitu_cpp_inference(){ ...@@ -80,7 +87,7 @@ function func_shitu_cpp_inference(){
continue continue
fi fi
for batch_size in ${cpp_batch_size_list[*]}; do for batch_size in ${cpp_batch_size_list[*]}; do
_save_log_path="${_log_path}/shitu_cpp_infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/cpp_infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log"
eval $transform_index_cmd eval $transform_index_cmd
command="${generate_yaml_cmd} --type shitu --batch_size ${batch_size} --mkldnn False --gpu ${use_gpu} --cpu_thread 1 --tensorrt ${use_trt} --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --det_model_dir ${cpp_det_infer_model_dir} --gpu_id ${GPUID}" command="${generate_yaml_cmd} --type shitu --batch_size ${batch_size} --mkldnn False --gpu ${use_gpu} --cpu_thread 1 --tensorrt ${use_trt} --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --det_model_dir ${cpp_det_infer_model_dir} --gpu_id ${GPUID}"
eval $command eval $command
...@@ -118,7 +125,7 @@ function func_cls_cpp_inference(){ ...@@ -118,7 +125,7 @@ function func_cls_cpp_inference(){
if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then
precison="int8" precison="int8"
fi fi
_save_log_path="${_log_path}/cls_cpp_infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_precision_${precision}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/cpp_infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_precision_${precision}_batchsize_${batch_size}.log"
command="${generate_yaml_cmd} --type cls --batch_size ${batch_size} --mkldnn ${use_mkldnn} --gpu ${use_gpu} --cpu_thread ${threads} --tensorrt False --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --gpu_id ${GPUID}" command="${generate_yaml_cmd} --type cls --batch_size ${batch_size} --mkldnn ${use_mkldnn} --gpu ${use_gpu} --cpu_thread ${threads} --tensorrt False --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --gpu_id ${GPUID}"
eval $command eval $command
...@@ -142,7 +149,7 @@ function func_cls_cpp_inference(){ ...@@ -142,7 +149,7 @@ function func_cls_cpp_inference(){
continue continue
fi fi
for batch_size in ${cpp_batch_size_list[*]}; do for batch_size in ${cpp_batch_size_list[*]}; do
_save_log_path="${_log_path}/cls_cpp_infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/cpp_infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log"
command="${generate_yaml_cmd} --type cls --batch_size ${batch_size} --mkldnn False --gpu ${use_gpu} --cpu_thread 1 --tensorrt ${use_trt} --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --gpu_id ${GPUID}" command="${generate_yaml_cmd} --type cls --batch_size ${batch_size} --mkldnn False --gpu ${use_gpu} --cpu_thread 1 --tensorrt ${use_trt} --precision ${precision} --data_dir ${_img_dir} --benchmark True --cls_model_dir ${cpp_infer_model_dir} --gpu_id ${GPUID}"
eval $command eval $command
command="${_script} > ${_save_log_path} 2>&1" command="${_script} > ${_save_log_path} 2>&1"
...@@ -235,18 +242,6 @@ cd ../../../ ...@@ -235,18 +242,6 @@ cd ../../../
# cd ../../ # cd ../../
echo "################### build PaddleClas demo finished ###################" echo "################### build PaddleClas demo finished ###################"
# set cuda device
# GPUID=$2
# if [ ${#GPUID} -le 0 ];then
# env="export CUDA_VISIBLE_DEVICES=0"
# else
# env="export CUDA_VISIBLE_DEVICES=${GPUID}"
# fi
# set CUDA_VISIBLE_DEVICES
# eval $env
echo "################### run test ###################" echo "################### run test ###################"
export Count=0 export Count=0
IFS="|" IFS="|"
......
#!/bin/bash
FILENAME=$1
source test_tipc/common_func.sh
# MODE be one of ['whole_infer']
MODE=$2
dataline=$(cat ${FILENAME})
# parser params
IFS=$'\n'
lines=(${dataline})
# The training params
model_name=$(func_parser_value "${lines[1]}")
python=$(func_parser_value "${lines[2]}")
gpu_list=$(func_parser_value "${lines[3]}")
train_use_gpu_key=$(func_parser_key "${lines[4]}")
train_use_gpu_value=$(func_parser_value "${lines[4]}")
autocast_list=$(func_parser_value "${lines[5]}")
autocast_key=$(func_parser_key "${lines[5]}")
epoch_key=$(func_parser_key "${lines[6]}")
epoch_num=$(func_parser_params "${lines[6]}")
save_model_key=$(func_parser_key "${lines[7]}")
train_batch_key=$(func_parser_key "${lines[8]}")
train_batch_value=$(func_parser_value "${lines[8]}")
pretrain_model_key=$(func_parser_key "${lines[9]}")
pretrain_model_value=$(func_parser_value "${lines[9]}")
train_model_name=$(func_parser_value "${lines[10]}")
train_infer_img_dir=$(func_parser_value "${lines[11]}")
train_param_key1=$(func_parser_key "${lines[12]}")
train_param_value1=$(func_parser_value "${lines[12]}")
trainer_list=$(func_parser_value "${lines[14]}")
trainer_norm=$(func_parser_key "${lines[15]}")
norm_trainer=$(func_parser_value "${lines[15]}")
pact_key=$(func_parser_key "${lines[16]}")
pact_trainer=$(func_parser_value "${lines[16]}")
fpgm_key=$(func_parser_key "${lines[17]}")
fpgm_trainer=$(func_parser_value "${lines[17]}")
distill_key=$(func_parser_key "${lines[18]}")
distill_trainer=$(func_parser_value "${lines[18]}")
to_static_key=$(func_parser_key "${lines[19]}")
to_static_trainer=$(func_parser_value "${lines[19]}")
trainer_key2=$(func_parser_key "${lines[20]}")
trainer_value2=$(func_parser_value "${lines[20]}")
eval_py=$(func_parser_value "${lines[23]}")
eval_key1=$(func_parser_key "${lines[24]}")
eval_value1=$(func_parser_value "${lines[24]}")
save_infer_key=$(func_parser_key "${lines[27]}")
export_weight=$(func_parser_key "${lines[28]}")
norm_export=$(func_parser_value "${lines[29]}")
pact_export=$(func_parser_value "${lines[30]}")
fpgm_export=$(func_parser_value "${lines[31]}")
distill_export=$(func_parser_value "${lines[32]}")
kl_quant_cmd_key=$(func_parser_key "${lines[33]}")
kl_quant_cmd_value=$(func_parser_value "${lines[33]}")
export_key2=$(func_parser_key "${lines[34]}")
export_value2=$(func_parser_value "${lines[34]}")
# parser inference model
infer_model_dir_list=$(func_parser_value "${lines[36]}")
infer_export_flag=$(func_parser_value "${lines[37]}")
infer_is_quant=$(func_parser_value "${lines[38]}")
# parser inference
inference_py=$(func_parser_value "${lines[39]}")
use_gpu_key=$(func_parser_key "${lines[40]}")
use_gpu_list=$(func_parser_value "${lines[40]}")
use_mkldnn_key=$(func_parser_key "${lines[41]}")
use_mkldnn_list=$(func_parser_value "${lines[41]}")
cpu_threads_key=$(func_parser_key "${lines[42]}")
cpu_threads_list=$(func_parser_value "${lines[42]}")
batch_size_key=$(func_parser_key "${lines[43]}")
batch_size_list=$(func_parser_value "${lines[43]}")
use_trt_key=$(func_parser_key "${lines[44]}")
use_trt_list=$(func_parser_value "${lines[44]}")
precision_key=$(func_parser_key "${lines[45]}")
precision_list=$(func_parser_value "${lines[45]}")
infer_model_key=$(func_parser_key "${lines[46]}")
image_dir_key=$(func_parser_key "${lines[47]}")
infer_img_dir=$(func_parser_value "${lines[47]}")
save_log_key=$(func_parser_key "${lines[48]}")
benchmark_key=$(func_parser_key "${lines[49]}")
benchmark_value=$(func_parser_value "${lines[49]}")
infer_key1=$(func_parser_key "${lines[50]}")
infer_value1=$(func_parser_value "${lines[50]}")
if [ ! $epoch_num ]; then
epoch_num=2
fi
if [[ $MODE = 'benchmark_train' ]]; then
epoch_num=1
fi
LOG_PATH="./test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_python.log"
function func_inference() {
IFS='|'
_python=$1
_script=$2
_model_dir=$3
_log_path=$4
_img_dir=$5
_flag_quant=$6
# inference
for use_gpu in ${use_gpu_list[*]}; do
if [ ${use_gpu} = "False" ] || [ ${use_gpu} = "cpu" ]; then
for use_mkldnn in ${use_mkldnn_list[*]}; do
for threads in ${cpu_threads_list[*]}; do
for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_batchsize_${batch_size}.log"
set_infer_data=$(func_set_params "${image_dir_key}" "${_img_dir}")
set_benchmark=$(func_set_params "${benchmark_key}" "${benchmark_value}")
set_batchsize=$(func_set_params "${batch_size_key}" "${batch_size}")
set_cpu_threads=$(func_set_params "${cpu_threads_key}" "${threads}")
set_model_dir=$(func_set_params "${infer_model_key}" "${_model_dir}")
set_infer_params1=$(func_set_params "${infer_key1}" "${infer_value1}")
command="${_python} ${_script} ${use_gpu_key}=${use_gpu} ${use_mkldnn_key}=${use_mkldnn} ${set_cpu_threads} ${set_model_dir} ${set_batchsize} ${set_infer_data} ${set_benchmark} ${set_infer_params1} > ${_save_log_path} 2>&1 "
eval $command
last_status=${PIPESTATUS[0]}
eval "cat ${_save_log_path}"
status_check $last_status "${command}" "../${status_log}" "${model_name}"
done
done
done
elif [ ${use_gpu} = "True" ] || [ ${use_gpu} = "gpu" ]; then
for use_trt in ${use_trt_list[*]}; do
for precision in ${precision_list[*]}; do
if [ ${precision} = "True" ] && [ ${use_trt} = "False" ]; then
continue
fi
for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log"
set_infer_data=$(func_set_params "${image_dir_key}" "${_img_dir}")
set_benchmark=$(func_set_params "${benchmark_key}" "${benchmark_value}")
set_batchsize=$(func_set_params "${batch_size_key}" "${batch_size}")
set_tensorrt=$(func_set_params "${use_trt_key}" "${use_trt}")
set_precision=$(func_set_params "${precision_key}" "${precision}")
set_model_dir=$(func_set_params "${infer_model_key}" "${_model_dir}")
command="${_python} ${_script} ${use_gpu_key}=${use_gpu} ${set_tensorrt} ${set_precision} ${set_model_dir} ${set_batchsize} ${set_infer_data} ${set_benchmark} > ${_save_log_path} 2>&1 "
eval $command
last_status=${PIPESTATUS[0]}
eval "cat ${_save_log_path}"
status_check $last_status "${command}" "../${status_log}" "${model_name}"
done
done
done
else
echo "Does not support hardware other than CPU and GPU Currently!"
fi
done
}
# for kl_quant
if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ]; then
echo "kl_quant"
command="${python} ${kl_quant_cmd_value}"
echo ${command}
eval $command
last_status=${PIPESTATUS[0]}
status_check $last_status "${command}" "${status_log}" "${model_name}"
cd ${infer_model_dir_list}/quant_post_static_model
ln -s __model__ inference.pdmodel
ln -s __params__ inference.pdiparams
cd ../../deploy
is_quant=True
func_inference "${python}" "${inference_py}" "../${infer_model_dir_list}/quant_post_static_model" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
cd ..
fi
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
source test_tipc/common_func.sh source test_tipc/common_func.sh
FILENAME=$1 FILENAME=$1
MODE=$2
dataline=$(awk 'NR==1, NR==19{print}' $FILENAME) dataline=$(awk 'NR==1, NR==19{print}' $FILENAME)
# parser params # parser params
...@@ -38,7 +39,7 @@ pipeline_py=$(func_parser_value "${lines[13]}") ...@@ -38,7 +39,7 @@ pipeline_py=$(func_parser_value "${lines[13]}")
function func_serving_cls(){ function func_serving_cls(){
LOG_PATH="test_tipc/output/${model_name}" LOG_PATH="test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH} mkdir -p ${LOG_PATH}
LOG_PATH="../../${LOG_PATH}" LOG_PATH="../../${LOG_PATH}"
status_log="${LOG_PATH}/results_serving.log" status_log="${LOG_PATH}/results_serving.log"
...@@ -153,7 +154,7 @@ function func_serving_cls(){ ...@@ -153,7 +154,7 @@ function func_serving_cls(){
function func_serving_rec(){ function func_serving_rec(){
LOG_PATH="test_tipc/output/${model_name}" LOG_PATH="test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH} mkdir -p ${LOG_PATH}
LOG_PATH="../../../${LOG_PATH}" LOG_PATH="../../../${LOG_PATH}"
status_log="${LOG_PATH}/results_serving.log" status_log="${LOG_PATH}/results_serving.log"
...@@ -310,7 +311,7 @@ echo "################### run test ###################" ...@@ -310,7 +311,7 @@ echo "################### run test ###################"
export Count=0 export Count=0
IFS="|" IFS="|"
if [[ ${model_name} =~ "ShiTu" ]]; then if [[ ${model_name} = "PPShiTu" ]]; then
func_serving_rec func_serving_rec
else else
func_serving_cls func_serving_cls
......
...@@ -32,6 +32,7 @@ train_param_key1=$(func_parser_key "${lines[12]}") ...@@ -32,6 +32,7 @@ train_param_key1=$(func_parser_key "${lines[12]}")
train_param_value1=$(func_parser_value "${lines[12]}") train_param_value1=$(func_parser_value "${lines[12]}")
trainer_list=$(func_parser_value "${lines[14]}") trainer_list=$(func_parser_value "${lines[14]}")
trainer_norm=$(func_parser_key "${lines[15]}") trainer_norm=$(func_parser_key "${lines[15]}")
norm_trainer=$(func_parser_value "${lines[15]}") norm_trainer=$(func_parser_value "${lines[15]}")
pact_key=$(func_parser_key "${lines[16]}") pact_key=$(func_parser_key "${lines[16]}")
...@@ -88,17 +89,17 @@ benchmark_value=$(func_parser_value "${lines[49]}") ...@@ -88,17 +89,17 @@ benchmark_value=$(func_parser_value "${lines[49]}")
infer_key1=$(func_parser_key "${lines[50]}") infer_key1=$(func_parser_key "${lines[50]}")
infer_value1=$(func_parser_value "${lines[50]}") infer_value1=$(func_parser_value "${lines[50]}")
if [ ! $epoch_num ]; then if [ ! $epoch_num ]; then
epoch_num=2 epoch_num=2
fi fi
if [[ $MODE = 'benchmark_train' ]]; then if [[ $MODE = 'benchmark_train' ]]; then
epoch_num=1 epoch_num=1
fi fi
LOG_PATH="./test_tipc/output/${model_name}" LOG_PATH="./test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH} mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_python.log" status_log="${LOG_PATH}/results_python.log"
function func_inference(){ function func_inference() {
IFS='|' IFS='|'
_python=$1 _python=$1
_script=$2 _script=$2
...@@ -110,9 +111,6 @@ function func_inference(){ ...@@ -110,9 +111,6 @@ function func_inference(){
for use_gpu in ${use_gpu_list[*]}; do for use_gpu in ${use_gpu_list[*]}; do
if [ ${use_gpu} = "False" ] || [ ${use_gpu} = "cpu" ]; then if [ ${use_gpu} = "False" ] || [ ${use_gpu} = "cpu" ]; then
for use_mkldnn in ${use_mkldnn_list[*]}; do for use_mkldnn in ${use_mkldnn_list[*]}; do
if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then
continue
fi
for threads in ${cpu_threads_list[*]}; do for threads in ${cpu_threads_list[*]}; do
for batch_size in ${batch_size_list[*]}; do for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_batchsize_${batch_size}.log"
...@@ -136,9 +134,6 @@ function func_inference(){ ...@@ -136,9 +134,6 @@ function func_inference(){
if [ ${precision} = "True" ] && [ ${use_trt} = "False" ]; then if [ ${precision} = "True" ] && [ ${use_trt} = "False" ]; then
continue continue
fi fi
if [[ ${use_trt} = "False" || ${precision} =~ "int8" ]] && [ ${_flag_quant} = "True" ]; then
continue
fi
for batch_size in ${batch_size_list[*]}; do for batch_size in ${batch_size_list[*]}; do
_save_log_path="${_log_path}/infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log" _save_log_path="${_log_path}/infer_gpu_usetrt_${use_trt}_precision_${precision}_batchsize_${batch_size}.log"
set_infer_data=$(func_set_params "${image_dir_key}" "${_img_dir}") set_infer_data=$(func_set_params "${image_dir_key}" "${_img_dir}")
...@@ -161,51 +156,23 @@ function func_inference(){ ...@@ -161,51 +156,23 @@ function func_inference(){
done done
} }
if [[ ${MODE} = "whole_infer" ]] || [[ ${MODE} = "klquant_whole_infer" ]]; then
IFS="|"
infer_export_flag=(${infer_export_flag})
if [ ${infer_export_flag} != "null" ] && [ ${infer_export_flag} != "False" ]; then
rm -rf ${infer_model_dir_list/..\//}
export_cmd="${python} ${norm_export} -o Global.pretrained_model=${model_name}_pretrained -o Global.save_inference_dir=${infer_model_dir_list/..\//}"
eval $export_cmd
fi
fi
if [[ ${MODE} = "whole_infer" ]]; then if [[ ${MODE} = "whole_infer" ]]; then
GPUID=$3
if [ ${#GPUID} -le 0 ];then
env=" "
else
env="export CUDA_VISIBLE_DEVICES=${GPUID}"
fi
# set CUDA_VISIBLE_DEVICES
eval $env
export Count=0
cd deploy
for infer_model in ${infer_model_dir_list[*]}; do
#run inference
is_quant=${infer_quant_flag[Count]}
echo "is_quant: ${is_quant}"
func_inference "${python}" "${inference_py}" "${infer_model}" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
Count=$(($Count + 1))
done
cd ..
elif [[ ${MODE} = "klquant_whole_infer" ]]; then
# for kl_quant # for kl_quant
if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ]; then if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ]; then
echo "kl_quant" echo "kl_quant"
command="${python} ${kl_quant_cmd_value}" command="${python} ${kl_quant_cmd_value}"
eval $command echo ${command}
last_status=${PIPESTATUS[0]} eval $command
status_check $last_status "${command}" "${status_log}" "${model_name}" last_status=${PIPESTATUS[0]}
cd inference/quant_post_static_model status_check $last_status "${command}" "${status_log}" "${model_name}"
ln -s __model__ inference.pdmodel cd ${infer_model_dir_list}/quant_post_static_model
ln -s __params__ inference.pdiparams ln -s __model__ inference.pdmodel
cd ../../deploy ln -s __params__ inference.pdiparams
is_quant=True cd ../../deploy
func_inference "${python}" "${inference_py}" "${infer_model_dir_list}/quant_post_static_model" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant} is_quant=True
cd .. func_inference "${python}" "${inference_py}" "../${infer_model_dir_list}/quant_post_static_model" "../${LOG_PATH}" "${infer_img_dir}" ${is_quant}
cd ..
fi fi
else else
IFS="|" IFS="|"
...@@ -215,12 +182,12 @@ else ...@@ -215,12 +182,12 @@ else
train_use_gpu=${USE_GPU_KEY[Count]} train_use_gpu=${USE_GPU_KEY[Count]}
Count=$(($Count + 1)) Count=$(($Count + 1))
ips="" ips=""
if [ ${gpu} = "-1" ];then if [ ${gpu} = "-1" ]; then
env="" env=""
elif [ ${#gpu} -le 1 ];then elif [ ${#gpu} -le 1 ]; then
env="export CUDA_VISIBLE_DEVICES=${gpu}" env="export CUDA_VISIBLE_DEVICES=${gpu}"
eval ${env} eval ${env}
elif [ ${#gpu} -le 15 ];then elif [ ${#gpu} -le 15 ]; then
IFS="," IFS=","
array=(${gpu}) array=(${gpu})
env="export CUDA_VISIBLE_DEVICES=${array[0]}" env="export CUDA_VISIBLE_DEVICES=${array[0]}"
...@@ -270,7 +237,7 @@ else ...@@ -270,7 +237,7 @@ else
set_batchsize=$(func_set_params "${train_batch_key}" "${train_batch_value}") set_batchsize=$(func_set_params "${train_batch_key}" "${train_batch_value}")
set_train_params1=$(func_set_params "${train_param_key1}" "${train_param_value1}") set_train_params1=$(func_set_params "${train_param_key1}" "${train_param_value1}")
set_use_gpu=$(func_set_params "${train_use_gpu_key}" "${train_use_gpu_value}") set_use_gpu=$(func_set_params "${train_use_gpu_key}" "${train_use_gpu_value}")
if [ ${#ips} -le 15 ];then if [ ${#ips} -le 15 ]; then
# if length of ips >= 15, then it is seen as multi-machine # if length of ips >= 15, then it is seen as multi-machine
# 15 is the min length of ips info for multi-machine: 0.0.0.0,0.0.0.0 # 15 is the min length of ips info for multi-machine: 0.0.0.0,0.0.0.0
save_log="${LOG_PATH}/${trainer}_gpus_${gpu}_autocast_${autocast}" save_log="${LOG_PATH}/${trainer}_gpus_${gpu}_autocast_${autocast}"
...@@ -289,28 +256,28 @@ else ...@@ -289,28 +256,28 @@ else
# fi # fi
set_save_model=$(func_set_params "${save_model_key}" "${save_log}") set_save_model=$(func_set_params "${save_model_key}" "${save_log}")
if [ ${#gpu} -le 2 ];then # train with cpu or single gpu if [ ${#gpu} -le 2 ]; then # train with cpu or single gpu
cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} " cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} "
elif [ ${#ips} -le 15 ];then # train with multi-gpu elif [ ${#ips} -le 15 ]; then # train with multi-gpu
cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1}" cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1}"
else # train with multi-machine else # train with multi-machine
cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1}" cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1}"
fi fi
# run train # run train
eval "unset CUDA_VISIBLE_DEVICES" eval "unset CUDA_VISIBLE_DEVICES"
# export FLAGS_cudnn_deterministic=True # export FLAGS_cudnn_deterministic=True
sleep 5 sleep 5
eval $cmd eval $cmd
status_check $? "${cmd}" "${status_log}" "${model_name}" status_check $? "${cmd}" "${status_log}" "${model_name}"
sleep 5 sleep 5
if [[ $FILENAME == *GeneralRecognition* ]]; then if [[ $FILENAME == *GeneralRecognition* ]]; then
set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/RecModel/${train_model_name}") set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/RecModel/${train_model_name}")
else else
set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/${model_name}/${train_model_name}") set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/${model_name}/${train_model_name}")
fi fi
# save norm trained models to set pretrain for pact training and fpgm training # save norm trained models to set pretrain for pact training and fpgm training
if [ ${trainer} = ${trainer_norm} ]; then if [[ ${trainer} = ${trainer_norm} || ${trainer} = ${pact_key} ]]; then
load_norm_train_model=${set_eval_pretrain} load_norm_train_model=${set_eval_pretrain}
fi fi
# run eval # run eval
...@@ -325,11 +292,11 @@ else ...@@ -325,11 +292,11 @@ else
if [ ${run_export} != "null" ]; then if [ ${run_export} != "null" ]; then
# run export model # run export model
save_infer_path="${save_log}" save_infer_path="${save_log}"
if [[ $FILENAME == *GeneralRecognition* ]]; then if [[ $FILENAME == *GeneralRecognition* ]]; then
set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/RecModel/${train_model_name}") set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/RecModel/${train_model_name}")
else else
set_export_weight=$(func_set_params "${export_weight}" "${save_log}/${model_name}/${train_model_name}") set_export_weight=$(func_set_params "${export_weight}" "${save_log}/${model_name}/${train_model_name}")
fi fi
set_save_infer_key=$(func_set_params "${save_infer_key}" "${save_infer_path}") set_save_infer_key=$(func_set_params "${save_infer_key}" "${save_infer_path}")
export_cmd="${python} ${run_export} ${set_export_weight} ${set_save_infer_key}" export_cmd="${python} ${run_export} ${set_export_weight} ${set_save_infer_key}"
eval $export_cmd eval $export_cmd
...@@ -338,12 +305,12 @@ else ...@@ -338,12 +305,12 @@ else
#run inference #run inference
eval $env eval $env
save_infer_path="${save_log}" save_infer_path="${save_log}"
cd deploy cd deploy
func_inference "${python}" "${inference_py}" "../${save_infer_path}" "../${LOG_PATH}" "${infer_img_dir}" "${flag_quant}" func_inference "${python}" "${inference_py}" "../${save_infer_path}" "../${LOG_PATH}" "${infer_img_dir}" "${flag_quant}"
cd .. cd ..
fi fi
eval "unset CUDA_VISIBLE_DEVICES" eval "unset CUDA_VISIBLE_DEVICES"
done # done with: for trainer in ${trainer_list[*]}; do done # done with: for trainer in ${trainer_list[*]}; do
done # done with: for autocast in ${autocast_list[*]}; do done # done with: for autocast in ${autocast_list[*]}; do
done # done with: for gpu in ${gpu_list[*]}; do done # done with: for gpu in ${gpu_list[*]}; do
fi # end if [ ${MODE} = "infer" ]; then fi # end if [ ${MODE} = "infer" ]; then
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册