From d199ef23af8504ddd1eb28cb5ad36c0319487aab Mon Sep 17 00:00:00 2001 From: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> Date: Fri, 24 Mar 2023 07:40:27 +0000 Subject: [PATCH 1/4] update TensorFlow/built-in/cv/image_classification/DenseNet121_ID0067_for_TensorFlow/README.md. Signed-off-by: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> --- .../README.md | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/TensorFlow/built-in/cv/image_classification/DenseNet121_ID0067_for_TensorFlow/README.md b/TensorFlow/built-in/cv/image_classification/DenseNet121_ID0067_for_TensorFlow/README.md index 9b14a5bab..a62514f77 100644 --- a/TensorFlow/built-in/cv/image_classification/DenseNet121_ID0067_for_TensorFlow/README.md +++ b/TensorFlow/built-in/cv/image_classification/DenseNet121_ID0067_for_TensorFlow/README.md @@ -163,13 +163,13 @@ DenseNet-121是一个经典的图像分类网络,主要特点是采用各层 [Ascend 910训练平台环境变量设置](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/01.%E8%AE%AD%E7%BB%83%E8%84%9A%E6%9C%AC%E8%BF%81%E7%A7%BB%E6%A1%88%E4%BE%8B/Ascend%20910%E8%AE%AD%E7%BB%83%E5%B9%B3%E5%8F%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE) -- 单卡训练 +- 单卡性能训练 1、 单p指令如下: cd test; bash train_performance_1p.sh --data_path=/path/to/data -- 8卡训练 +- 8卡性能训练 1、 8p指令如下: cd test; @@ -177,7 +177,19 @@ DenseNet-121是一个经典的图像分类网络,主要特点是采用各层 2、 8p 绑核指令如下: cd test; - train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + bash train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + +- 单卡精度训练 + + 1、 单p指令如下: + cd test; + bash train_full_1p.sh --data_path=/path/to/data + +- 8卡精度训练 + + 1、 8p指令如下: + cd test; + bash train_full_8p.sh --data_path=/path/to/data - 验证。 @@ -332,7 +344,7 @@ DenseNet-121是一个经典的图像分类网络,主要特点是采用各层 1. 通过“模型训练”中的训练指令启动单卡或者多卡训练。单卡和多卡通过运行不同脚本,支持单卡、8卡网络训练。 -2. 参考脚本的模型存储路径为results/1p或者results/8p,训练脚本log中包括如下信息。 +2. 参考脚本的模型存储路径为test/output,训练脚本log中包括如下信息。 ``` 2020-06-20 22:25:48.893067: I tf_adapter/kernels/geop_npu.cc:64] BuildOutputTensorInfo, num_outputs:1 -- Gitee From b37cd24f3e7728df9e4b333c2445de6eef5a12fd Mon Sep 17 00:00:00 2001 From: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> Date: Fri, 24 Mar 2023 07:52:02 +0000 Subject: [PATCH 2/4] update TensorFlow/built-in/cv/image_classification/InceptionV4_ID0002_for_TensorFlow/README.md. Signed-off-by: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> --- .../README.md | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/TensorFlow/built-in/cv/image_classification/InceptionV4_ID0002_for_TensorFlow/README.md b/TensorFlow/built-in/cv/image_classification/InceptionV4_ID0002_for_TensorFlow/README.md index db7fd7472..7bd4a07f2 100644 --- a/TensorFlow/built-in/cv/image_classification/InceptionV4_ID0002_for_TensorFlow/README.md +++ b/TensorFlow/built-in/cv/image_classification/InceptionV4_ID0002_for_TensorFlow/README.md @@ -149,21 +149,31 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re [Ascend 910训练平台环境变量设置](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/01.%E8%AE%AD%E7%BB%83%E8%84%9A%E6%9C%AC%E8%BF%81%E7%A7%BB%E6%A1%88%E4%BE%8B/Ascend%20910%E8%AE%AD%E7%BB%83%E5%B9%B3%E5%8F%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE) - 2. 单卡训练 + 2. 单卡性能训练 2.1 单p指令如下: cd test; bash train_performance_1p.sh --data_path=/path/to/data - 3. 8卡训练 + 3. 8卡性能训练 3.1 8p指令如下: cd test; bash train_performance_8p.sh --data_path=/path/to/data - 3.1 8p 绑核指令如下: + 3.2 8p 绑核指令如下: cd test; - train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + bash train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + + 4. 单卡精度训练 + 4.1 单p指令如下: + cd test; + bash train_full_1p.sh --data_path=/path/to/data + + 5.8卡精度训练 + 5.1 8p指令如下: + cd test; + bash train_full_8p.sh --data_path=/path/to/data - 验证。 @@ -172,7 +182,7 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re ``` --mode=evaluate - --eval_dir=${dname}/scripts/result/8p/2/model + --eval_dir=${cur_path}/output/$ASCEND_DEVICE_ID/ckpt ``` @@ -301,9 +311,9 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re ## 训练过程 1. 通过“模型训练”中的训练指令启动单卡或者多卡训练。单卡和多卡通过运行不同脚本,支持单卡,8卡网络训练。 -2. 将训练脚本(train_1p.sh,train_8p.sh)中的data_dir设置为训练数据集的路径。具体的流程参见“模型训练”的示例。 -3. 模型存储路径为“results/1p”或者“results/8p”,包括训练的log以及checkpoints文件。 -4. 以单卡训练为例,loss信息在文件results/1p/0/model/inception_v4.log中,示例如下。 +2. 具体的流程参见“模型训练”的示例。 +3. 模型存储路径为test/output,包括训练的log以及checkpoints文件。 +4. 以单卡训练为例,loss信息在文件test/output/0/train_0.log中,示例如下。 ``` step: 12100 epoch: 1.2 FPS: 469.5 loss: 4.676 total_loss: 5.051 lr:0.04499 -- Gitee From 06f2c56b1d8c7436cb8a488eefdb625b93b2204e Mon Sep 17 00:00:00 2001 From: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> Date: Fri, 24 Mar 2023 07:56:49 +0000 Subject: [PATCH 3/4] update TensorFlow/built-in/cv/image_classification/InceptionV3_ID0504_for_TensorFlow/README.md. Signed-off-by: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> --- .../README.md | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/TensorFlow/built-in/cv/image_classification/InceptionV3_ID0504_for_TensorFlow/README.md b/TensorFlow/built-in/cv/image_classification/InceptionV3_ID0504_for_TensorFlow/README.md index cdacdb8a2..7e8cd5db5 100644 --- a/TensorFlow/built-in/cv/image_classification/InceptionV3_ID0504_for_TensorFlow/README.md +++ b/TensorFlow/built-in/cv/image_classification/InceptionV3_ID0504_for_TensorFlow/README.md @@ -150,21 +150,31 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re [Ascend 910训练平台环境变量设置](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/01.%E8%AE%AD%E7%BB%83%E8%84%9A%E6%9C%AC%E8%BF%81%E7%A7%BB%E6%A1%88%E4%BE%8B/Ascend%20910%E8%AE%AD%E7%BB%83%E5%B9%B3%E5%8F%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE) - 2. 单卡训练 + 2. 单卡性能训练 2.1 单p指令如下: cd test; bash train_performance_1p.sh --data_path=/path/to/data - 3. 8卡训练 + 3. 8卡性能训练 3.1 8p指令如下: cd test; bash train_performance_8p.sh --data_path=/path/to/data - 3.1 8p 绑核指令如下: + 3.2 8p 绑核指令如下: cd test; - train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + bash train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + + 4. 单卡精度训练 + 4.1 单p指令如下: + cd test; + bash train_full_1p.sh --data_path=/path/to/data + + 5. 8卡精度训练 + 5.1 8p指令如下: + cd test; + bash train_full_8p.sh --data_path=/path/to/data - 验证。 @@ -173,7 +183,7 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re ``` --mode=evaluate - --data_dir=/opt/npu/imagenet_data + --eval_dir=${cur_path}/output/$ASCEND_DEVICE_ID/ckpt ``` @@ -299,9 +309,9 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re #### 训练过程 1. 通过“模型训练”中的训练指令启动单卡或者多卡训练。单卡和多卡通过运行不同脚本,支持单卡,8卡网络训练。 -2. 将训练脚本(train_1p.sh,train_8p.sh)中的data_dir设置为训练数据集的路径。具体的流程参见“模型训练”的示例。 -3. 模型存储路径为“results/1p”或者“results/8p”,包括训练的log以及checkpoints文件。 -4. 以单卡训练为例,loss信息在文件results/1p/0/model/inception_v3.log中,示例如下。 +2. 具体的流程参见“模型训练”的示例。 +3. 模型存储路径为“test/output”,包括训练的log以及checkpoints文件。 +4. 以单卡训练为例,loss信息在文件test/output/0/train_0.log中,示例如下。 ``` step: 12100 epoch: 1.2 FPS: 469.5 loss: 4.676 total_loss: 5.051 lr:0.04499 -- Gitee From 2cf91a72ff1e745229cfb3d924a5c580f6a251e5 Mon Sep 17 00:00:00 2001 From: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> Date: Fri, 24 Mar 2023 08:00:10 +0000 Subject: [PATCH 4/4] update TensorFlow/built-in/cv/image_classification/InceptionV2_ID0670_for_TensorFlow/README.md. Signed-off-by: YakeeXv <9837540+yakeexv@user.noreply.gitee.com> --- .../README.md | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/TensorFlow/built-in/cv/image_classification/InceptionV2_ID0670_for_TensorFlow/README.md b/TensorFlow/built-in/cv/image_classification/InceptionV2_ID0670_for_TensorFlow/README.md index 1e4d6067f..139bf74c8 100644 --- a/TensorFlow/built-in/cv/image_classification/InceptionV2_ID0670_for_TensorFlow/README.md +++ b/TensorFlow/built-in/cv/image_classification/InceptionV2_ID0670_for_TensorFlow/README.md @@ -150,21 +150,32 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re [Ascend 910训练平台环境变量设置](https://gitee.com/ascend/ModelZoo-TensorFlow/wikis/01.%E8%AE%AD%E7%BB%83%E8%84%9A%E6%9C%AC%E8%BF%81%E7%A7%BB%E6%A1%88%E4%BE%8B/Ascend%20910%E8%AE%AD%E7%BB%83%E5%B9%B3%E5%8F%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE) - 2. 单卡训练 + 2. 单卡性能训练 2.1 单p指令如下: cd test; bash train_performance_1p.sh --data_path=/path/to/data - 3. 8卡训练 + 3. 8卡性能训练 3.1 8p指令如下: cd test; bash train_performance_8p.sh --data_path=/path/to/data - 3.1 8p 绑核指令如下: + 3.2 8p 绑核指令如下: cd test; - train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + bash train_performance_8p.sh --bind_core=1 --data_path=/path/to/data + + 4. 单卡精度训练 + 4.1 单p指令如下: + cd test; + bash train_full_1p.sh --data_path=/path/to/data + + 5. 8卡精度训练 + 5.1 8p指令如下: + cd test; + bash train_full_8p.sh --data_path=/path/to/data + - 验证。 @@ -173,7 +184,7 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re ``` --mode=evaluate - --data_dir=/opt/npu/imagenet_data + --eval_dir=${cur_path}/output/$ASCEND_DEVICE_ID/ckpt ``` @@ -302,9 +313,9 @@ InceptionV4是2016年提出的Inception系列网络的第四个版本,随着Re ## 训练过程 1. 通过“模型训练”中的训练指令启动单卡或者多卡训练。单卡和多卡通过运行不同脚本,支持单卡,8卡网络训练。 -2. 将训练脚本(train_1p.sh,train_8p.sh)中的data_dir设置为训练数据集的路径。具体的流程参见“模型训练”的示例。 -3. 模型存储路径为“results/1p”或者“results/8p”,包括训练的log以及checkpoints文件。 -4. 以单卡训练为例,loss信息在文件results/1p/0/model/inception_v3.log中,示例如下。 +2. 具体的流程参见“模型训练”的示例。 +3. 模型存储路径为“test/output”,包括训练的log以及checkpoints文件。 +4. 以单卡训练为例,loss信息在文件test/output/0/train_0.log中,示例如下。 ``` step: 12100 epoch: 1.2 FPS: 469.5 loss: 4.676 total_loss: 5.051 lr:0.04499 -- Gitee