From 4cc15c556c09fc0d70a828e2b4d95d7453098048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:15:14 +0000 Subject: [PATCH 01/11] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTenso?= =?UTF-8?q?rFlow/built-in/cv/Resnet18=5Ffor=5FACL/README.md=20=E4=B8=BA=20?= =?UTF-8?q?ACL=5FTensorFlow/built-in/cv/Resnet18=5Ffor=5FACL/README=5FEn.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../built-in/cv/Resnet18_for_ACL/{README.md => README_En.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/{README.md => README_En.md} (100%) diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md similarity index 100% rename from ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md rename to ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md -- Gitee From b46be15c23343d0673e009851cdd683c7b023e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:15:31 +0000 Subject: [PATCH 02/11] add ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md new file mode 100644 index 000000000..e69de29bb -- Gitee From f19d4d106e9dc00a49613e8d5d250b5f8f876acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:17:15 +0000 Subject: [PATCH 03/11] update ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- .../built-in/cv/Resnet18_for_ACL/README_En.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md index 543cefe4a..70da7c3bf 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md +++ b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md @@ -1,4 +1,4 @@ - +English|[中文](README.md) # Resnet18 Inference for Tensorflow @@ -53,14 +53,7 @@ The jpegs pictures will be preprocessed to bin fils. - configure the env - ``` - export install_path=/usr/local/Ascend - export PATH=/usr/local/python3.7.5/bin:${install_path}/atc/ccec_compiler/bin:${install_path}/atc/bin:$PATH - export PYTHONPATH=${install_path}/atc/python/site-packages:${install_path}/atc/python/site-packages/auto_tune.egg/auto_tune:${install_path}/atc/python/site-packages/schedule_search.egg:$PYTHONPATH - export LD_LIBRARY_PATH=${install_path}/atc/lib64:${install_path}/acllib/lib64:$LD_LIBRARY_PATH - export ASCEND_OPP_PATH=${install_path}/opp - ``` - + Please follow the [guide](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719) to set the envs - convert pb to om [pb download link](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/modelzoo/resnet18_tf.pb) -- Gitee From b6d47145d2c31d105eab1d3516990401f61e9dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:22:58 +0000 Subject: [PATCH 04/11] update ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- .../built-in/cv/Resnet18_for_ACL/README.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md index e69de29bb..e7f92423b 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md +++ b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md @@ -0,0 +1,93 @@ +中文|[English](README_EN.md) + +# Resnet18 TensorFlow离线推理 + +此链接提供Resnet18 TensorFlow模型在NPU上离线推理的脚本和方法 + +## 注意 +**此案例仅为您学习Ascend软件栈提供参考,不用于商业目的。** + +在开始之前,请注意以下适配条件。如果不匹配,可能导致运行失败。 + +| Conditions | Need | +| --- | --- | +| CANN版本 | >=5.0.3 | +| 芯片平台| Ascend310/Ascend310P3 | +| 第三方依赖| 请参考 'requirements.txt' | + +## 快速指南 + +### 1. 拷贝代码 + +```shell +git clone https://gitee.com/ascend/ModelZoo-TensorFlow.git +cd Modelzoo-TensorFlow/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL +``` + +### 2. 下载数据集和预处理 + +1. 请自行下载Tiny-ImageNet-200测试数据集 + +2. 将 **tiny-imagenet-200** 移动到 **'scripts/'**目录下 +``` +———scripts + |————tiny-imagenet-200 + |————test + |————train + |————val + |————wnids.txt + |————words.txt +``` + +3. 图片预处理: +``` +cd scripts +mkdir input_bins +python3 imagenet_tiny_preprocessing.py +``` +jpeg图片将被预处理成bin文件. + +### 3. 离线推理 + +**Pb模型转换为om模型** + +- 环境变量设置 + + 请参考[说明](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719),设置环境变量 +- Pb模型转换为om模型 + + [pb模型下载链接](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/modelzoo/resnet18_tf.pb) + + ``` + atc --model=resnet18_tf.pb --framework=3 --output=resnet18_tf_1batch --output_type=FP32 --soc_version=Ascend310 --input_shape="test_inputs:1,64,64,3" --log=info --insert_op_conf=resnet18_tf_aipp.cfg --enable_small_channel=1 + ``` + +- 编译程序 + + ``` + bash build.sh + ``` + +- 开始运行: + + ``` + cd scripts + bash benchmark_tf.sh + ``` + +## 性能 + +### 结果 + +本结果是通过运行上面适配的推理脚本获得的。要获得相同的结果,请按照《快速指南》中的步骤操作。 + +#### 推理精度结果 + + +| model | **data** | Top1/Top5 | +| :---------------: | :-------: | :-------------: | +| offline Inference | 10000 images | 51.0 %/ 76.1% | + + +## Reference +[1] https://github.com/taki0112/ResNet-Tensorflow -- Gitee From 178cb5c758ab61c044e2e9166447b0db51969018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:23:31 +0000 Subject: [PATCH 05/11] update ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md index e7f92423b..54340e95b 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md +++ b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README.md @@ -89,5 +89,5 @@ jpeg图片将被预处理成bin文件. | offline Inference | 10000 images | 51.0 %/ 76.1% | -## Reference +## 参考 [1] https://github.com/taki0112/ResNet-Tensorflow -- Gitee From a0a890e804335724aa8208dda511e9b3bfd2b08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:24:27 +0000 Subject: [PATCH 06/11] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTenso?= =?UTF-8?q?rFlow/built-in/cv/Resnet18=5Ffor=5FACL/README=5FEn.md=20?= =?UTF-8?q?=E4=B8=BA=20ACL=5FTensorFlow/built-in/cv/Resnet18=5Ffor=5FACL/R?= =?UTF-8?q?EADME=5FEN.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../built-in/cv/Resnet18_for_ACL/{README_En.md => README_EN.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/{README_En.md => README_EN.md} (100%) diff --git a/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md b/ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_EN.md similarity index 100% rename from ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_En.md rename to ACL_TensorFlow/built-in/cv/Resnet18_for_ACL/README_EN.md -- Gitee From d9b60b4a461225e959a6e03497c4b4d820123b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:27:42 +0000 Subject: [PATCH 07/11] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20ACL=5FTenso?= =?UTF-8?q?rFlow/built-in/cv/Resnet34=5Ffor=5FACL/README.md=20=E4=B8=BA=20?= =?UTF-8?q?ACL=5FTensorFlow/built-in/cv/Resnet34=5Ffor=5FACL/README=5FEN.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../built-in/cv/Resnet34_for_ACL/{README.md => README_EN.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/{README.md => README_EN.md} (100%) diff --git a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md similarity index 100% rename from ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md rename to ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md -- Gitee From 12d75fc06398194b015031c7b28be3d875f53a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:29:16 +0000 Subject: [PATCH 08/11] update ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- .../built-in/cv/Resnet34_for_ACL/README_EN.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md index 50e3736a8..331cb9fd4 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md +++ b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README_EN.md @@ -1,4 +1,4 @@ - +English|[中文](README.md) # Resnet34 Inference for Tensorflow @@ -53,13 +53,7 @@ The jpegs pictures will be preprocessed to bin fils. - configure the env - ``` - export install_path=/usr/local/Ascend - export PATH=/usr/local/python3.7.5/bin:${install_path}/atc/ccec_compiler/bin:${install_path}/atc/bin:$PATH - export PYTHONPATH=${install_path}/atc/python/site-packages:${install_path}/atc/python/site-packages/auto_tune.egg/auto_tune:${install_path}/atc/python/site-packages/schedule_search.egg:$PYTHONPATH - export LD_LIBRARY_PATH=${install_path}/atc/lib64:${install_path}/acllib/lib64:$LD_LIBRARY_PATH - export ASCEND_OPP_PATH=${install_path}/opp - ``` + Please follow the [guide](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719) to set the envs - convert pb to om -- Gitee From e94765e01ac15f8487edf3b78cfb683d08e3ccb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:30:15 +0000 Subject: [PATCH 09/11] add ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- .../built-in/cv/Resnet34_for_ACL/README.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md diff --git a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md new file mode 100644 index 000000000..a5e936103 --- /dev/null +++ b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md @@ -0,0 +1,93 @@ +中文|[English](README_EN.md) + +# Resnet34 Inference for Tensorflow + +This repository provides a script and recipe to Inference of the Resnet34 model. + +## Notice +**This sample only provides reference for you to learn the Ascend software stack and is not for commercial purposes.** + +Before starting, please pay attention to the following adaptation conditions. If they do not match, may leading in failure. + +| Conditions | Need | +| --- | --- | +| CANN Version | >=5.0.3 | +| Chip Platform| Ascend310/Ascend310P3 | +| 3rd Party Requirements| Please follow the 'requirements.txt' | + +## Quick Start Guide + +### 1. Clone the respository + +```shell +git clone https://gitee.com/ascend/ModelZoo-TensorFlow.git +cd Modelzoo-TensorFlow/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL +``` + +### 2. Download and preprocess the dataset + +1. Download the Tiny-ImageNet-200 dataset by yourself. + +2. Move **tiny-imagenet-200** to **'scripts/'** +``` +———scripts + |————tiny-imagenet-200 + |————test + |————train + |————val + |————wnids.txt + |————words.txt +``` + +3. Images Preprocess: +``` +cd scripts +mkdir input_bins +python3 imagenet_tiny_preprocessing.py +``` +The jpegs pictures will be preprocessed to bin fils. + +### 3. Offline Inference + +**Convert pb to om.** + +- configure the env + + Please follow the [guide](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719) to set the envs + +- convert pb to om + + [pb download link](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/modelzoo/resnet34_tf.pb) + + ``` + atc --model=resnet34_tf.pb --framework=3 --output=resnet34_tf_1batch --output_type=FP32 --soc_version=Ascend310 --input_shape="test_inputs:1,64,64,3" --log=info --insert_op_conf=resnet34_tf_aipp.cfg --enable_small_channel=1 + ``` + +- Build the program + + ``` + bash build.sh + ``` + +- Run the program: + + ``` + cd scripts + bash benchmark_tf.sh + ``` + +## Performance + +### Result + +Our result was obtained by running the applicable inference script. To achieve the same results, follow the steps in the Quick Start Guide. + +#### Inference accuracy results + +| model | **data** | Top1/Top5 | +| :---------------: | :-------: | :-------------: | +| offline Inference | 10000 images | 51.9 %/ 76.6% | + + +## Reference +[1] https://github.com/taki0112/ResNet-Tensorflow -- Gitee From 617696ee0edd183ecd4e8e9580d518df4620e4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:37:10 +0000 Subject: [PATCH 10/11] update ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- .../built-in/cv/Resnet34_for_ACL/README.md | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md index a5e936103..56a3ba175 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md +++ b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md @@ -1,34 +1,33 @@ 中文|[English](README_EN.md) -# Resnet34 Inference for Tensorflow +# Resnet34 TensorFlow离线推理 -This repository provides a script and recipe to Inference of the Resnet34 model. +此链接提供Resnet34 TensorFlow模型在NPU上离线推理的脚本和方法 +## 注意 +**此案例仅为您学习Ascend软件栈提供参考,不用于商业目的。** -## Notice -**This sample only provides reference for you to learn the Ascend software stack and is not for commercial purposes.** - -Before starting, please pay attention to the following adaptation conditions. If they do not match, may leading in failure. +在开始之前,请注意以下适配条件。如果不匹配,可能导致运行失败。 | Conditions | Need | | --- | --- | -| CANN Version | >=5.0.3 | -| Chip Platform| Ascend310/Ascend310P3 | -| 3rd Party Requirements| Please follow the 'requirements.txt' | +| CANN版本 | >=5.0.3 | +| 芯片平台| Ascend310/Ascend310P3 | +| 第三方依赖| 请参考 'requirements.txt' | -## Quick Start Guide +## 快速指南 -### 1. Clone the respository +### 1. 拷贝代码 ```shell git clone https://gitee.com/ascend/ModelZoo-TensorFlow.git cd Modelzoo-TensorFlow/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL ``` -### 2. Download and preprocess the dataset +### 2. 下载数据集和预处理 -1. Download the Tiny-ImageNet-200 dataset by yourself. +1. 请自行下载Tiny-ImageNet-200测试数据集 -2. Move **tiny-imagenet-200** to **'scripts/'** +2. 将 **tiny-imagenet-200** 移动到 **'scripts/'**目录下 ``` ———scripts |————tiny-imagenet-200 @@ -39,55 +38,55 @@ cd Modelzoo-TensorFlow/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL |————words.txt ``` -3. Images Preprocess: +3. 图片预处理: ``` cd scripts mkdir input_bins python3 imagenet_tiny_preprocessing.py ``` -The jpegs pictures will be preprocessed to bin fils. +jpeg图片江北预处理成bin文件 -### 3. Offline Inference +### 3. 离线推理 -**Convert pb to om.** +**Pb模型转换为om模型** -- configure the env +- 环境变量设置 - Please follow the [guide](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719) to set the envs + 请参考[说明](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/02.%E7%A6%BB%E7%BA%BF%E6%8E%A8%E7%90%86%E6%A1%88%E4%BE%8B/Ascend%E5%B9%B3%E5%8F%B0%E6%8E%A8%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE?sort_id=6458719),设置环境变量 -- convert pb to om +- Pb模型转换为om模型 - [pb download link](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/modelzoo/resnet34_tf.pb) + [pb模型下载链接](https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/modelzoo/resnet34_tf.pb) ``` atc --model=resnet34_tf.pb --framework=3 --output=resnet34_tf_1batch --output_type=FP32 --soc_version=Ascend310 --input_shape="test_inputs:1,64,64,3" --log=info --insert_op_conf=resnet34_tf_aipp.cfg --enable_small_channel=1 ``` -- Build the program +- 编译程序 ``` bash build.sh ``` -- Run the program: +- 开始运行: ``` cd scripts bash benchmark_tf.sh ``` -## Performance +## 性能 -### Result +### 结果 -Our result was obtained by running the applicable inference script. To achieve the same results, follow the steps in the Quick Start Guide. +本结果是通过运行上面适配的推理脚本获得的。要获得相同的结果,请按照《快速指南》中的步骤操作。 -#### Inference accuracy results +#### 推理精度结果 | model | **data** | Top1/Top5 | | :---------------: | :-------: | :-------------: | | offline Inference | 10000 images | 51.9 %/ 76.6% | -## Reference +## 参考 [1] https://github.com/taki0112/ResNet-Tensorflow -- Gitee From 0f269b550e42ae7d0030885e5fb02613f214eadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=90=86=E4=B8=AD?= <7563702+zhang_lizhong@user.noreply.gitee.com> Date: Fri, 21 Oct 2022 01:37:50 +0000 Subject: [PATCH 11/11] update ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张理中 <7563702+zhang_lizhong@user.noreply.gitee.com> --- ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md index 56a3ba175..51c9887ea 100644 --- a/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md +++ b/ACL_TensorFlow/built-in/cv/Resnet34_for_ACL/README.md @@ -44,7 +44,7 @@ cd scripts mkdir input_bins python3 imagenet_tiny_preprocessing.py ``` -jpeg图片江北预处理成bin文件 +jpeg图片将被预处理成bin文件 ### 3. 离线推理 -- Gitee