diff --git a/ACL_PyTorch/contrib/cv/detection/EfficientDetD0/README.md b/ACL_PyTorch/contrib/cv/detection/EfficientDetD0/README.md index 50cbf513a8ccc5db09377ddfc7efe304f58d6b34..502284a332cfbe8f233a66746eb2e67d914a5026 100755 --- a/ACL_PyTorch/contrib/cv/detection/EfficientDetD0/README.md +++ b/ACL_PyTorch/contrib/cv/detection/EfficientDetD0/README.md @@ -236,7 +236,7 @@ EfficientDet是在EfficientNet基础上提出来的目标检测模型,它将Ef 调用脚本postprocess.py预测精度 ``` - python postprocess.py --root=./coco_data --omfile=./result + python EfficientDetD0_postprocess.py --root=./coco_data --omfile=./result ``` - 参数说明: - root:数据集路径 diff --git a/ACL_PyTorch/contrib/nlp/BertSum/README.md b/ACL_PyTorch/contrib/nlp/BertSum/README.md index cc265685221509aa1232b8055418391f14b496a3..4dade8d9be4545a15da8858fed3eeed91004e499 100644 --- a/ACL_PyTorch/contrib/nlp/BertSum/README.md +++ b/ACL_PyTorch/contrib/nlp/BertSum/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -45,20 +43,6 @@ BertSum模型主要由句子编码层和摘要判断层组成,其中,`句子 | output | batch_size x class | FLOAT32 | ND | | mask_cls | batch_size x class | FLOAT32 | ND | -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.RC1 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.5.0+ | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -137,7 +121,7 @@ BertSum模型主要由句子编码层和摘要判断层组成,其中,`句子 执行“BertSum_preprocess.py”脚本,完成预处理。 ``` - python BertSum_pth_preprocess.py -bert_data_path ./bert_data/cnndm -out_path ./prep_data + python3 BertSum_pth_preprocess.py -bert_data_path ./bert_data/cnndm -out_path ./prep_data ``` - 参数说明: @@ -179,7 +163,7 @@ BertSum模型主要由句子编码层和摘要判断层组成,其中,`句子 ``` # 以bs1为例 - python -m onnxsim ./bertsum_13000_9.onnx ./bertsum_13000_9_sim_bs1.onnx --input-shape "src:1,512" "segs:1,512" "clss:1,37" "mask:1,512" "mask_cls:1,37" + python3 -m onnxsim ./bertsum_13000_9.onnx ./bertsum_13000_9_sim_bs1.onnx --input-shape "src:1,512" "segs:1,512" "clss:1,37" "mask:1,512" "mask_cls:1,37" ``` 3. 使用ATC工具将ONNX模型转OM模型。 @@ -261,7 +245,7 @@ BertSum模型主要由句子编码层和摘要判断层组成,其中,`句子 ``` mkdir temp # 创建临时存储文件 - python BertSum_pth_postprocess.py -bert_data_path ./bert_data/cnndm -bert_config_path BertSum/bert_config_uncased_base.json -result_dir ./results/bs1 + python3 BertSum_pth_postprocess.py -bert_data_path ./bert_data/cnndm -bert_config_path BertSum/bert_config_uncased_base.json -result_dir ./results/bs1 ``` - 输入参数说明: - -bert_data_path:原始数据路径。 diff --git a/ACL_PyTorch/contrib/nlp/CNN_Transformer_for_Pytorch/README.md b/ACL_PyTorch/contrib/nlp/CNN_Transformer_for_Pytorch/README.md index efdbc6a5866db4d317ebe11a8ad9f86070d33ea8..b54f2a34c740f3f937adc8d690579b2ca05fdacb 100644 --- a/ACL_PyTorch/contrib/nlp/CNN_Transformer_for_Pytorch/README.md +++ b/ACL_PyTorch/contrib/nlp/CNN_Transformer_for_Pytorch/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -49,24 +45,6 @@ CNN_Transformer是学习用于解决自监督任务的基本语音单元。对 | -------- | -------- | ------------------------- | ------------ | | output | FLOAT32 | batchsize x data_len x 32 | ND | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.9.1 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/ELMo/README.md b/ACL_PyTorch/contrib/nlp/ELMo/README.md index 52f14a4cdffdeb5dfdf52259c90f90457e0b7d44..91512abebffec3410af7713ea036cc958d04ae73 100644 --- a/ACL_PyTorch/contrib/nlp/ELMo/README.md +++ b/ACL_PyTorch/contrib/nlp/ELMo/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -46,21 +44,6 @@ ELMo模型是用于训练得到单词词向量的,不同于以往常用的word | -------- | -------- | -------- | ------------ | | output | 1 x 8 x 1024 | FLOAT32 | NWD | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.8.1 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -175,7 +158,7 @@ ELMo模型是用于训练得到单词词向量的,不同于以往常用的word ``` python3 -m onnxsim elmo.onnx elmo_sim.onnx - python -m auto_optimizer optimize elmo_sim.onnx elmo_sim_opt.onnx + python3 -m auto_optimizer optimize elmo_sim.onnx elmo_sim_opt.onnx ``` 获得elmo_sim_opt.onnx文件。 diff --git a/ACL_PyTorch/contrib/nlp/GNMT/README.md b/ACL_PyTorch/contrib/nlp/GNMT/README.md index 97cc573386a178982bb5745cd0a936c1082196d3..d285b2456ddd948bb7270a0034b2c37c511fcaa7 100644 --- a/ACL_PyTorch/contrib/nlp/GNMT/README.md +++ b/ACL_PyTorch/contrib/nlp/GNMT/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -51,21 +49,6 @@ GNMT是一个端到端机器翻译系统,它解决了NMT训练速度慢、很 | ----------- | ------ | -------- | ------------ | | translation | 1 x 30 | INT32 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.12.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 1. 获取开源代码。 diff --git a/ACL_PyTorch/contrib/nlp/RARE_Resnet34_vd/README.md b/ACL_PyTorch/contrib/nlp/RARE_Resnet34_vd/README.md index 7df607625d7c7e63c7326a0257ee58585b866b0c..c81a14b9a6617219c595ea5ffb831cd56c9d9863 100644 --- a/ACL_PyTorch/contrib/nlp/RARE_Resnet34_vd/README.md +++ b/ACL_PyTorch/contrib/nlp/RARE_Resnet34_vd/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -48,24 +46,6 @@ RARE是一个对于不规则的文字具有鲁棒性的识别模型模型,参 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x 25 x 38 | ND | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | paddlepaddle | 2.3.2 | 该依赖只支持x86 | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/Rosetta_MobileNetV3/README.md b/ACL_PyTorch/contrib/nlp/Rosetta_MobileNetV3/README.md index 2383f583fb8917466f2fc59d58cd5fb014015d22..1e559b2211a6a822e5eeeb28666ceb75e018d86e 100644 --- a/ACL_PyTorch/contrib/nlp/Rosetta_MobileNetV3/README.md +++ b/ACL_PyTorch/contrib/nlp/Rosetta_MobileNetV3/README.md @@ -2,7 +2,6 @@ - [Rosetta\_MobileNetV3 模型推理指导](#rosetta_mobilenetv3-模型推理指导) - [概述](#概述) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -38,22 +37,6 @@ Rosetta是用于图像中文本检测和识别的大规模系统,文本识别 | ----------- | ---------- | ----------- | ----------- | | softmax_0.tmp_0 | FLOAT32 | ND | batchsize x 25 x 37 | - - ----- -# 推理环境 - -- 该模型推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - | - | Python | 3.7.5 | - | - - 说明:该模型离线推理使用 Atlas 300I Pro 推理卡,Atlas 300I Duo 推理卡请以 CANN 版本选择实际固件与驱动版本。 - - ---- # 快速上手 @@ -73,7 +56,7 @@ Rosetta是用于图像中文本检测和识别的大规模系统,文本识别 3. 执行以下命令安装所需的依赖。 ```shell - pip install -r requirements.txt + pip3 install -r requirements.txt python setup.py install ``` @@ -123,7 +106,7 @@ Rosetta是用于图像中文本检测和识别的大规模系统,文本识别 2. 数据预处理 执行前处理脚本将原始数据转换为 OM 模型输入需要的 bin 文件。 ```shell - python rosetta_preprocess.py \ + python3 rosetta_preprocess.py \ --config configs/rec/rec_mv3_none_none_ctc.yml \ --opt data_dir=rosetta/lmdb/ bin_dir=rosetta/bin_list info_dir=rosetta/info_list ``` @@ -259,7 +242,7 @@ Rosetta是用于图像中文本检测和识别的大规模系统,文本识别 执行后处理脚本,根据推理结果计算OM模型的准确率: ```shell - python rosetta_postprocess.py \ + python3 rosetta_postprocess.py \ -c configs/rec/rec_mv3_none_none_ctc.yml \ -o res_dir=rosetta/val_bs1_out/2022_09_26-15_13_53/ info_dir=rosetta/info_list/ ``` diff --git a/ACL_PyTorch/contrib/nlp/Rosetta_Resnet34_vd/README.md b/ACL_PyTorch/contrib/nlp/Rosetta_Resnet34_vd/README.md index 283b950cb9a23030f83af04025f3c0fa7022aa85..5535a723b48ae5bba80035ad9d8ef42b85bc99e7 100644 --- a/ACL_PyTorch/contrib/nlp/Rosetta_Resnet34_vd/README.md +++ b/ACL_PyTorch/contrib/nlp/Rosetta_Resnet34_vd/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -55,21 +53,6 @@ | -------- | -------- | -------- | ------------ | | output1 | batchsize x 25 x 37 | FLOAT32 | ND | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| paddlepaddle | 2.3.2 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/SAST/README.md b/ACL_PyTorch/contrib/nlp/SAST/README.md index b3b117caf039b9442facba7ac01414770ceaa2bd..9381b25dced9b3718b29681f6820cb5388074838 100644 --- a/ACL_PyTorch/contrib/nlp/SAST/README.md +++ b/ACL_PyTorch/contrib/nlp/SAST/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -45,20 +43,6 @@ SAST模型提出了一个one-shot的文本检测器,基于多任务学习, | output3 | FLOAT32 | batchsize x 2 x 224 x 384 | NCHW | | output4 | FLOAT32 | batchsize x 8 x 224 x 384 | NCHW | -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.11.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 diff --git a/ACL_PyTorch/contrib/nlp/SATRN/README.md b/ACL_PyTorch/contrib/nlp/SATRN/README.md index 2e884005a28746545155f206fc516eda008571d6..fe988c53be89f336b54784ee6b92251395952e22 100644 --- a/ACL_PyTorch/contrib/nlp/SATRN/README.md +++ b/ACL_PyTorch/contrib/nlp/SATRN/README.md @@ -2,7 +2,6 @@ - [SATRN 模型推理指导](#satrn-模型推理指导) - [概述](#概述) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -37,21 +36,6 @@ | ----------- | ---------- | ----------- | ----------- | | output | FLOAT32 | ND | 1 x 25 x 92 | - - ----- -# 推理环境 - -- 该模型离线推理使用 Atlas 300I Pro 推理卡,推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | firmware | 1.82.22.2.220 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | driver | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | Python | 3.8 | - | - - ---- # 快速上手 @@ -113,7 +97,7 @@ 2. 数据预处理 执行前处理脚本将原始数据转换为 OM 模型输入需要的 bin 文件。 ```shell - python satrn_preprocess.py --cfg-path configs/textrecog/satrn/satrn_small.py --save-dir satrn/test_bin + python3 satrn_preprocess.py --cfg-path configs/textrecog/satrn/satrn_small.py --save-dir satrn/test_bin ``` 参数说明: + --cfg-path: 模型配置文件路径 @@ -134,7 +118,7 @@ step2: 生成 ONNX 模型 ``` - python satrn_pth2onnx.py \ + python3 satrn_pth2onnx.py \ --cfg-path configs/textrecog/satrn/satrn_small.py \ --ckpt-path satrn/satrn_small_20211009-2cf13355.pth \ --onnx-path satrn/satrn.onnx @@ -229,7 +213,7 @@ 执行后处理脚本,根据推理结果计算OM模型的准确率: ```shell - python satrn_postprocess.py --result-dir satrn/test_out/2022_09_28-08_47_23/ --gt-path data/mixture/IIIT5K/test_label.txt + python3 satrn_postprocess.py --result-dir satrn/test_out/2022_09_28-08_47_23/ --gt-path data/mixture/IIIT5K/test_label.txt ``` 参数说明: + --result-dir: 存放推理结果的目录路径 diff --git a/ACL_PyTorch/contrib/nlp/SDMGR/README.md b/ACL_PyTorch/contrib/nlp/SDMGR/README.md index 0e52d50255af06156bafd5995505f7e047df3d91..66b412aa92fa10dc450116041e99b3141c0c6efc 100644 --- a/ACL_PyTorch/contrib/nlp/SDMGR/README.md +++ b/ACL_PyTorch/contrib/nlp/SDMGR/README.md @@ -2,7 +2,6 @@ - [概述](#概述) - [输入输出数据](#输入输出数据) -- [推理环境](#推理环境) - [快速上手](#快速上手) - [获取源码](#获取源码) - [准备数据集](#准备数据集) @@ -40,22 +39,6 @@ SDMGR是一种多模态端到端的文档关键信息抽取模型,它同时使 | nodes | FLOAT32 | ND | num_text x num_text | | edges | FLOAT32 | ND | (num_text * num_text) x 2 | - - ----- -# 推理环境 - -- 该模型推理所需配套的软件如下: - - | 配套 | 版本 | 环境准备指导 | - | --------- | ------- | ---------- | - | 固件与驱动 | 1.0.18 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.1 | - | - | Python | 3.8.13 | - | - - 说明:请根据推理卡型号与 CANN 版本选择相匹配的固件与驱动版本。 - - ---- # 快速上手 diff --git a/ACL_PyTorch/contrib/nlp/SpanBERT/README.md b/ACL_PyTorch/contrib/nlp/SpanBERT/README.md index 58a2f88e34e9b5de76211ab929832ae9c714d077..d20ed108573046ce00aaf975b0322a19fbb02674 100644 --- a/ACL_PyTorch/contrib/nlp/SpanBERT/README.md +++ b/ACL_PyTorch/contrib/nlp/SpanBERT/README.md @@ -4,10 +4,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -59,37 +55,6 @@ SpanBERT在BERT的基础上,采用Geometric Spans的遮盖方案并加入Span | output | FLOAT32 | batchsize x 512 | ND | -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - -- 该模型需要以下依赖 - - **表 2** 依赖列表 - - | 依赖名称 | 版本 | - | ----------- | ------ | - | torch | 1.8.1 | - | boto3 | 1.24.3 | - | requests | 2.27.1 | - | tqdm | 4.64.0 | - | sympy | 1.10.1 | - | decorator | 5.1.1 | - | onnxruntime | 1.11.1 | - | numpy | 1.21.6 | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/StarNet_MobileNetV3/README.md b/ACL_PyTorch/contrib/nlp/StarNet_MobileNetV3/README.md index 73aa6bb9c70494217ebef1bc75b3f50e18f392c4..f45ef8b71a5101f2be9d2877a6f776bd4fbf0441 100644 --- a/ACL_PyTorch/contrib/nlp/StarNet_MobileNetV3/README.md +++ b/ACL_PyTorch/contrib/nlp/StarNet_MobileNetV3/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -55,22 +53,6 @@ | -------- | -------- | -------- | ------------ | | output1 | batchsize x 25 x 37 | FLOAT32 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.RC1 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.12.1 | - | -| paddlepaddle | 2.3.2 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/TextCNN/README.md b/ACL_PyTorch/contrib/nlp/TextCNN/README.md index c6c5f32f58f6b410931405a87f5d602a335ff090..58fa19e97ba3214d723793a1abe3100dd3f93f48 100644 --- a/ACL_PyTorch/contrib/nlp/TextCNN/README.md +++ b/ACL_PyTorch/contrib/nlp/TextCNN/README.md @@ -5,7 +5,7 @@ 1.安装必要的依赖,测试环境可能已经安装其中的一些不同版本的库了,故手动测试时不推荐使用该命令安装 ``` -pip3.7 install -r requirements.txt +pip3 install -r requirements.txt ``` 2.获取,修改与安装开源模型代码 diff --git a/ACL_PyTorch/contrib/nlp/TrOCR/README.md b/ACL_PyTorch/contrib/nlp/TrOCR/README.md index 00cf00ef0a91ab05cfa60c5a692b9b5b845420fe..ffd4a30553e49118b5065af4e57fc6ff36408596 100644 --- a/ACL_PyTorch/contrib/nlp/TrOCR/README.md +++ b/ACL_PyTorch/contrib/nlp/TrOCR/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -55,21 +53,6 @@ TrOCR是一种端到端的文本识别方法,具有预先训练好的图像Tra | scores_out | 31 x 10 x 201 | FLOAT32 | ND | | attn_out | 31 x 10 x 578x202 | FLOAT32 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.12.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 1. 获取开源代码。 diff --git a/ACL_PyTorch/contrib/nlp/Transformer/README.md b/ACL_PyTorch/contrib/nlp/Transformer/README.md index eafae78e77c97b5fefad30044cd950bc327e01d2..30f77309324ea53a5051979986bc274dfe26c09f 100644 --- a/ACL_PyTorch/contrib/nlp/Transformer/README.md +++ b/ACL_PyTorch/contrib/nlp/Transformer/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [源码及环境](#section4622531142816) @@ -61,21 +59,6 @@ | -------- | ------ | -------- | ------------ | | output | 1 x 15 | INT64 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 1.0.15 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.RC1 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.8.0 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 源码及环境 diff --git a/ACL_PyTorch/contrib/nlp/TransformerXL_for_Pytorch/README.md b/ACL_PyTorch/contrib/nlp/TransformerXL_for_Pytorch/README.md index 4adf71b4105964f8b01f49c5c957bc185b400bf8..5628506e72ebc5092691210956c5f6fbcbb45ae0 100755 --- a/ACL_PyTorch/contrib/nlp/TransformerXL_for_Pytorch/README.md +++ b/ACL_PyTorch/contrib/nlp/TransformerXL_for_Pytorch/README.md @@ -4,8 +4,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -46,21 +44,6 @@ Transformer-XL是一个自然语言处理框架,在Transformer的基础上提 | -------- | ------------- | -------- | ------------ | | output | 80 x 204 | FLOAT16 | ND | | mems | 160 x 1 x 512 | FLOAT16 | ND | - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 1.0.17 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.8.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | # 快速上手 diff --git a/ACL_PyTorch/contrib/nlp/Transformerxl_large/README.md b/ACL_PyTorch/contrib/nlp/Transformerxl_large/README.md index bd6d1bae263998385734a7d800dc147eaf2d2372..1438c01b67194d061b6a8531f535ed4f21d3a945 100644 --- a/ACL_PyTorch/contrib/nlp/Transformerxl_large/README.md +++ b/ACL_PyTorch/contrib/nlp/Transformerxl_large/README.md @@ -1,7 +1,7 @@ ## 环境准备 1. 安装必要的依赖 ``` -pip3.7 install -r requirements.txt +pip3 install -r requirements.txt ``` 2. 获取,修改与安装开源模型代码 ``` @@ -23,7 +23,7 @@ bash getdata.sh # enwik8数据集在data/enwik8下,包含处理好的train.tx ``` git clone https://gitee.com/Ronnie_zheng/MagicONNX.git cd MagicONNX && git checkout 8d62ae9dde478f35bece4b3d04eef573448411c9 -pip install . && cd.. +pip3 install . && cd.. ``` ## 离线推理 @@ -63,3 +63,6 @@ bash test/eval_acc_perf.sh ${om_out_path} ${target_bin} # om_out_path路径 | --------- | -------- | | bpc=5.37 | bpc=5.39 | + +# 公网地址说明 +代码涉及公网地址参考 public_address_statement.md \ No newline at end of file diff --git a/ACL_PyTorch/contrib/nlp/Transformerxl_large/public_address_statement.md b/ACL_PyTorch/contrib/nlp/Transformerxl_large/public_address_statement.md new file mode 100644 index 0000000000000000000000000000000000000000..39d91cdbe2a03115339b6aa0c03ff0234616d1db --- /dev/null +++ b/ACL_PyTorch/contrib/nlp/Transformerxl_large/public_address_statement.md @@ -0,0 +1,5 @@ +| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 | +| ---- | ------------ | ------ | ------------------------------------ | -------- | +|开发引入|https://github.com/kimiyoung/transformer-xl.git |getdata.sh |http://mattmahoney.net/dc/enwik8.zip |说明源码出处| +|开发引入|https://github.com/kimiyoung/transformer-xl.git |getdata.sh |https://raw.githubusercontent.com/salesforce/awd-lstm-lm/master/data/enwik8/prep_enwik8.py |说明源码出处| +|开源代码引入|https://github.com/kimiyoung/transformer-xl.git |sample.patch |https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/python/ops/candidate_sampling_ops.py |说明源码出处| \ No newline at end of file diff --git a/ACL_PyTorch/contrib/nlp/bert_large_NER/README.md b/ACL_PyTorch/contrib/nlp/bert_large_NER/README.md index 48b24a4d73a291d50a0cb4a76d117be5542a52ff..8b24d4b6c7c216c2c5589f468a308331dce4ffe8 100644 --- a/ACL_PyTorch/contrib/nlp/bert_large_NER/README.md +++ b/ACL_PyTorch/contrib/nlp/bert_large_NER/README.md @@ -2,7 +2,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - [快速上手](#ZH-CN_TOPIC_0000001126281700) @@ -50,20 +49,6 @@ | -------- | -------------------- | -------- | ------------ | | logits | batchsize x 512 x 9 | FLOAT32 | ND | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ---------- | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.RC1 | - | -| Python | 3.7.5 | - | -| Pytorch | 1.12.0 | - | - # 快速上手 ## 获取源码 @@ -100,7 +85,7 @@ 2. 安装依赖。 ``` - pip install -r requirements.txt + pip3 install -r requirements.txt ``` @@ -125,7 +110,7 @@ 生成om模型需要的推理数据,完成预处理: ``` - python bin_create.py --input_file='./conll2003/test.txt' --model_name_from_hub='./bert-large-NER' + python3 bin_create.py --input_file='./conll2003/test.txt' --model_name_from_hub='./bert-large-NER' ``` * --input_file:输入数据集 * --model_name_from_hub:所使用的hugging face 开源模型名,需要调用其中的的字典进行数据生成 @@ -141,11 +126,11 @@ 1. 使用transformers[onnx]导出onnx文件 ``` - pip install transforemers[onnx] + pip3 install transforemers[onnx] ``` ``` - python -m transformers.onnx --model=bert-large-NER --feature=token-classification onnx/ + python3 -m transformers.onnx --model=bert-large-NER --feature=token-classification onnx/ ``` * --model:hugging face上下载的开源模型 @@ -168,7 +153,7 @@ ``` # 简化onnx文件 其中seq_len=512,bs为批次大小 - python -m onnxsim model.onnx bert_large_bs${bs}_sim.onnx --input-shape "input_ids:${bs},${seq_len}" "attention_mask:${bs},${seq_len}" "token_type_ids:${bs},${seq_len}" + python3 -m onnxsim model.onnx bert_large_bs${bs}_sim.onnx --input-shape "input_ids:${bs},${seq_len}" "attention_mask:${bs},${seq_len}" "token_type_ids:${bs},${seq_len}" # 修改onnx文件 python fix_onnx.py bert_large_bs${bs}_sim.onnx bert_large_bs${bs}_fix.onnx ``` @@ -241,7 +226,7 @@ ``` # 性能测试 - python -m ais_bench --model ./bert_large_bs${bs}_fix.om --batchsize ${bs} --loop 50 + python3 -m ais_bench --model ./bert_large_bs${bs}_fix.om --batchsize ${bs} --loop 50 ``` 参数说明: @@ -256,7 +241,7 @@ ``` # 精度测试 - python -m ais_bench --model ./bert_large_bs${bs}_fix.om --input "./bert_bin/bert_bin_2022xxxx-xxxxxx/input_ids,./bert_bin/bert_bin_2022xxxx-xxxxxx/attention_mask,./bert_bin/bert_bin_2022xxxx-xxxxxx/token_type_ids" --output ./bert-large-OUT/bs${bs} --batchsize ${bs} --outfmt NPY + python3 -m ais_bench --model ./bert_large_bs${bs}_fix.om --input "./bert_bin/bert_bin_2022xxxx-xxxxxx/input_ids,./bert_bin/bert_bin_2022xxxx-xxxxxx/attention_mask,./bert_bin/bert_bin_2022xxxx-xxxxxx/token_type_ids" --output ./bert-large-OUT/bs${bs} --batchsize ${bs} --outfmt NPY ``` 参数说明: @@ -277,7 +262,7 @@ ``` # 调用脚本将推理生成数据与数据集标签比对,可以获得Accuracy数据,结果保存在result.json中 - python bert_metric.py --result_dir ./bert-large-OUT/bs${bs}/2022_xx_xx-xx_xx_xx --anno_file ./bert_bin/bert_bin_2022xxxx-xxxxxx.anno + python3 bert_metric.py --result_dir ./bert-large-OUT/bs${bs}/2022_xx_xx-xx_xx_xx --anno_file ./bert_bin/bert_bin_2022xxxx-xxxxxx.anno ``` 参数说明: diff --git a/ACL_PyTorch/contrib/nlp/ch_PP-OCRv2_rec/README.md b/ACL_PyTorch/contrib/nlp/ch_PP-OCRv2_rec/README.md index 227ce989a37c46ddbf3b594eb7ab3326d3da8651..9938d5073f898e26afe46274c5b38613caf7b7b4 100755 --- a/ACL_PyTorch/contrib/nlp/ch_PP-OCRv2_rec/README.md +++ b/ACL_PyTorch/contrib/nlp/ch_PP-OCRv2_rec/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -45,21 +43,6 @@ ch_PP-OCRv2_rec是基于[PP-OCRv2](https://arxiv.org/abs/2109.03144)的中文文 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x D x 6625 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| paddlepaddle | 2.3.2 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -96,7 +79,7 @@ ch_PP-OCRv2_rec是基于[PP-OCRv2](https://arxiv.org/abs/2109.03144)的中文文 在`ch_PP-OCRv2_rec`工作目录下,执行ch_PP-OCRv2_rec_preprocess.py脚本,完成预处理。 ``` - python ch_PP-OCRv2_rec_preprocess.py \ + python3 ch_PP-OCRv2_rec_preprocess.py \ -c PaddleOCR/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml \ -o Global.infer_img=PaddleOCR/doc/imgs_words/ch/ ``` @@ -216,7 +199,7 @@ ch_PP-OCRv2_rec是基于[PP-OCRv2](https://arxiv.org/abs/2109.03144)的中文文 b. 执行推理。 ``` - python -m ais_bench --model=ch_PP-OCRv2_rec_bs1.om --input=./pre_data/ --output=./ --output_dirname=results_bs1 --auto_set_dymdims_mode=1 --outfmt=NPY + python3 -m ais_bench --model=ch_PP-OCRv2_rec_bs1.om --input=./pre_data/ --output=./ --output_dirname=results_bs1 --auto_set_dymdims_mode=1 --outfmt=NPY ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/nlp/ch_PP-OCRv3_rec/README.md b/ACL_PyTorch/contrib/nlp/ch_PP-OCRv3_rec/README.md index 6b1b8e82e6449f196c3498f262d1dd84620372a3..9aa0cb6b8b2da68aa20c6fa51bb649ba3816d885 100755 --- a/ACL_PyTorch/contrib/nlp/ch_PP-OCRv3_rec/README.md +++ b/ACL_PyTorch/contrib/nlp/ch_PP-OCRv3_rec/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -44,21 +42,6 @@ ch_PP-OCRv3_rec是基于[[PP-OCRv3](https://github.com/PaddlePaddle/PaddleOCR/bl | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x D x 6625 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| paddlepaddle | 2.3.2 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 @@ -217,7 +200,7 @@ ch_PP-OCRv3_rec是基于[[PP-OCRv3](https://github.com/PaddlePaddle/PaddleOCR/bl b. 执行推理。 ``` - python -m ais_bench --model=ch_PP-OCRv3_rec_bs1.om --input=./image_npy --output=./ --output_dirname=results_bs1 --auto_set_dymdims_mode=1 + python3 -m ais_bench --model=ch_PP-OCRv3_rec_bs1.om --input=./image_npy --output=./ --output_dirname=results_bs1 --auto_set_dymdims_mode=1 ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/nlp/ch_ppocr_server_v2.0_rec/README.md b/ACL_PyTorch/contrib/nlp/ch_ppocr_server_v2.0_rec/README.md index a6ec164d04179213e78be9590afde7864e2d5c30..b6ac9f6025977ca1c4e55b5f9dd87fdd4be6aab0 100644 --- a/ACL_PyTorch/contrib/nlp/ch_ppocr_server_v2.0_rec/README.md +++ b/ACL_PyTorch/contrib/nlp/ch_ppocr_server_v2.0_rec/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -47,20 +45,6 @@ ch_ppocr_server_v2.0_rec是一种通用的中文中文的识别模型,它的 | -------- | -------- | -------- | ------------ | | output1 | FLOAT32 | batchsize x 40 x 97 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - | - | Python | 3.7.5 | - | - | paddlepaddle | 2.3.2 | 仅支持x86服务器安装 | - # 快速上手 ## 获取源码 @@ -219,7 +203,7 @@ ch_ppocr_server_v2.0_rec是一种通用的中文中文的识别模型,它的 b. 执行推理。 在当前目录下运行以下指令 ``` - python -m ais_bench --model=ch_ppocr_server_v2.0_rec_bs1.om --input=./pre_data --output=./ --output_dirname=results_bs1--auto_set_dymdims_mode=1 --outfmt=NPY + python3 -m ais_bench --model=ch_ppocr_server_v2.0_rec_bs1.om --input=./pre_data --output=./ --output_dirname=results_bs1--auto_set_dymdims_mode=1 --outfmt=NPY ``` - 参数说明: @@ -236,7 +220,7 @@ ch_ppocr_server_v2.0_rec是一种通用的中文中文的识别模型,它的 在`ch_ppocr_server_v2.0_rec`工作目录下执行后处理脚本`ch_server_rec_postprocess.py`,参考命令如下: ``` - python ch_server_rec_postprocess.py \ + python3 ch_server_rec_postprocess.py \ -c PaddleOCR/configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml \ -o Global.infer_results=./results_bs1 ``` diff --git a/ACL_PyTorch/contrib/nlp/deberta/README.md b/ACL_PyTorch/contrib/nlp/deberta/README.md index 8131cb59ec8646c583014c3f93e9fc8487210f36..ca95363cb7f39a8cc8aad71f80b9a745ef487293 100644 --- a/ACL_PyTorch/contrib/nlp/deberta/README.md +++ b/ACL_PyTorch/contrib/nlp/deberta/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -52,22 +48,6 @@ DeBERTa使用两种新技术改进了BERT和RoBERTa模型。第一种是解耦 | output1 | FLOAT32 | batchsize x 3 | ND | -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 5.1.RC2 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.11.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 @@ -239,7 +219,7 @@ DeBERTa使用两种新技术改进了BERT和RoBERTa模型。第一种是解耦 调用脚本与数据集标签val\_label.txt比对,可以获得Accuracy数据,结果保存在result.json中。 ``` - python3.7 deberta_postprocess.py --datasets_path ${dataset_path}/ --bin_file_path ./result/${dataset_version}/*/ --dataset_version ${dataset_version} --eval_save_path ./result --eval_save_file eval_bs${batch_size}_${dataset_version}.txt + python3 deberta_postprocess.py --datasets_path ${dataset_path}/ --bin_file_path ./result/${dataset_version}/*/ --dataset_version ${dataset_version} --eval_save_path ./result --eval_save_file eval_bs${batch_size}_${dataset_version}.txt ``` - 参数说明: @@ -255,7 +235,7 @@ DeBERTa使用两种新技术改进了BERT和RoBERTa模型。第一种是解耦 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python3.7 -m ais_bench --model=${om_model_path} --loop=20 --batchsize=${batch_size} + python3 -m ais_bench --model=${om_model_path} --loop=20 --batchsize=${batch_size} ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/nlp/en_PP-OCRv3_rec/README.md b/ACL_PyTorch/contrib/nlp/en_PP-OCRv3_rec/README.md index 02ee2919e2a0fed4721f990f8a288f76c8150ad0..45956a2cd9663a2f95e0ea9ed8d3b8468b600571 100644 --- a/ACL_PyTorch/contrib/nlp/en_PP-OCRv3_rec/README.md +++ b/ACL_PyTorch/contrib/nlp/en_PP-OCRv3_rec/README.md @@ -3,8 +3,6 @@ - [概述](#ZH-CN_TOPIC_0000001172161501) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -54,21 +52,6 @@ en_PP-OCRv3_rec是基于[[PP-OCRv3](https://github.com/PaddlePaddle/PaddleOCR/bl | -------- | -------- | -------- | ------------ | | output1 | batchsize x 40 x 97 | FLOAT32 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| paddlepaddle | 2.3.2 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/hubert/README.md b/ACL_PyTorch/contrib/nlp/hubert/README.md index ca8e655017ee419fb8060ffd3a9969f839842210..107893a0f363852d5adf1fba8d7b245bd1b6a58d 100644 --- a/ACL_PyTorch/contrib/nlp/hubert/README.md +++ b/ACL_PyTorch/contrib/nlp/hubert/README.md @@ -1,7 +1,6 @@ # Hubert模型离线推理指导 - [概述](#概述) - [输入输出数据](#输入输出数据) -- [推理环境准备](#推理环境准备) - [快速上手](#快速上手) @@ -45,25 +44,6 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 |---------------| -------- |--------| ------------ | | result | 1812 x 1 x 32 | FLOAT32 | ND | - - - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ |---------| ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2FModelZoo%2Fpytorchframework%2Fpies) | -| CANN | 6.0.RC1 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.11.0 | - | -| 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | | | - - - # 快速上手 ## 获取源码 @@ -82,7 +62,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 2. 安装依赖。 ``` - pip3.7.5 install -r requirements.txt + pip3 install -r requirements.txt ``` ​ @@ -133,7 +113,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 ``` mkdir -p ./pre_data/test-clean - python3.7.5 hubert_preprocess.py --model_path ./hubert_large_ll60k_finetune_ls960.pt --datasets_tsv_path ./data/test-clean/train.tsv --datasets_ltr_path ./data/test-clean/train.ltr --pre_data_source_save_path ./pre_data/test-clean/source/ --pre_data_label_save_path ./pre_data/test-clean/label/ + python3 hubert_preprocess.py --model_path ./hubert_large_ll60k_finetune_ls960.pt --datasets_tsv_path ./data/test-clean/train.tsv --datasets_ltr_path ./data/test-clean/train.ltr --pre_data_source_save_path ./pre_data/test-clean/source/ --pre_data_label_save_path ./pre_data/test-clean/label/ ``` - 参数说明 @@ -173,7 +153,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 运行pth2onnx.py脚本。 ``` - python3.7.5 pth2onnx.py --model_path hubert_large_ll60k_finetune_ls960.pt --onnx_path ./hubert.onnx + python3 pth2onnx.py --model_path hubert_large_ll60k_finetune_ls960.pt --onnx_path ./hubert.onnx ``` 获得hubert.onnx文件。 @@ -238,7 +218,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 2. 执行推理。 ``` - python3.7.5 -m ais_bench --model hubert.om --batchsize 1 --input "./pre_data/test-clean/source/" --output "./out_data/test-clean/" --device 0 + python3 -m ais_bench --model hubert.om --batchsize 1 --input "./pre_data/test-clean/source/" --output "./out_data/test-clean/" --device 0 ``` - 参数说明: - --model: 需要进行推理的om离线模型文件。 @@ -255,7 +235,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 ``` mkdir -p ./res_data/test-clean - python3.7.5 hubert_postprocess.py --model_path ./hubert_large_ll60k_finetune_ls960.pt --source_json_path ./out_data/test-clean/2023_01_06-02_25_32_summary.json --label_bin_file_path ./pre_data/test-clean/label/ --res_file_path ./res_data/test-clean/ + python3 hubert_postprocess.py --model_path ./hubert_large_ll60k_finetune_ls960.pt --source_json_path ./out_data/test-clean/2023_01_06-02_25_32_summary.json --label_bin_file_path ./pre_data/test-clean/label/ --res_file_path ./res_data/test-clean/ ``` - 参数说明: @@ -269,7 +249,7 @@ HuBERT是一种学习自监督语音表征的新方法。通过在聚类和预 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python3.7.5 -m ais_bench --model hubert.om --batchsize 1 --output ./result --loop 1000 --device 0 + python3 -m ais_bench --model hubert.om --batchsize 1 --output ./result --loop 1000 --device 0 ``` - 参数说明: diff --git a/ACL_PyTorch/contrib/nlp/m2m_100/README.md b/ACL_PyTorch/contrib/nlp/m2m_100/README.md index ea39d4b03409e78fa366245df4649636f3066153..a8908c4b018dbac34d5c858cf5a5fe4174620d91 100644 --- a/ACL_PyTorch/contrib/nlp/m2m_100/README.md +++ b/ACL_PyTorch/contrib/nlp/m2m_100/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -46,20 +42,6 @@ m2m100是Meta公司开发的最新seq2seq模型,支持100中语言间的互相 | -------- | -------- | -------- | ------------ | | output | FLOAT32 | 5 x 1 X 128112 | ND | -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 22.0.3 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.0.RC1 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.9.0 | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/roberta/README.md b/ACL_PyTorch/contrib/nlp/roberta/README.md index 77d1b9c06d8adfa592eb4b9fa5d58b807ce276e5..ed21ca589a4fc89aee30b3c47e9fe5cdd9040301 100644 --- a/ACL_PyTorch/contrib/nlp/roberta/README.md +++ b/ACL_PyTorch/contrib/nlp/roberta/README.md @@ -5,10 +5,6 @@ - [输入输出数据](#section540883920406) - - -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -48,22 +44,6 @@ | -------- | -------- | -------- | ------------ | | output | FLOAT32 | batchsize x num_class | ND | -# 推理环境准备 - -- 该模型需要以下插件与驱动: - - **表 1** 版本配套表 - - | 配套 | 版本 | 环境准备指导 | - | ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | - | 固件与驱动 | 23.0.RC2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | - | CANN | 6.3.RC2 | - | - | Python | 3.7.5 | - | - | PyTorch | 1.5.0+ | - | - | 说明:Atlas 300I Duo 推理卡请以CANN版本选择实际固件与驱动版本。 | \ | \ | - - - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/nlp/tinybert/README.md b/ACL_PyTorch/contrib/nlp/tinybert/README.md index a52a32070467f52e1e5502ab677c5370a5307494..f8313f2c74b4c911d44bbb9290618ae36ba75ff6 100755 --- a/ACL_PyTorch/contrib/nlp/tinybert/README.md +++ b/ACL_PyTorch/contrib/nlp/tinybert/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -36,20 +34,6 @@ TinyBERT是一种新型的Transformer蒸馏方法,该方法能将大型教师B | -------- | -------- | ------------------ | ------------ | | output1 | FLOAT32 | batchsize x 4 x 51 | ND | - -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ---------- | ------- | ----------------------- | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.0 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.8.0 | - | - # 快速上手 ## 获取源码 diff --git a/ACL_PyTorch/contrib/rl/DQN/README.md b/ACL_PyTorch/contrib/rl/DQN/README.md index ed94e4a257f462935207c1c8fc23cccd5bb6b5f8..26c48d653336f9ff4f4ca12037946dacdd1229b7 100644 --- a/ACL_PyTorch/contrib/rl/DQN/README.md +++ b/ACL_PyTorch/contrib/rl/DQN/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -66,20 +64,6 @@ DQN其实是深度学习和强化学习知识的结合,也就是用Deep Networ | action |2 or 3 | FLOAT32 | N | -# 推理环境准备\[所有版本\] - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ------------------------------------------------------------ | ------- | ------------------------------------------------------------ | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 5.1.RC2 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.5.0 | - | - - # 快速上手 ## 获取源码 @@ -216,7 +200,7 @@ DQN其实是深度学习和强化学习知识的结合,也就是用Deep Networ ``` mkdir result - python3.7 -m ais_bench --model=dqn_bs1.om --input bin_path --output result --outfmt BIN --batchsize 1 + python3 -m ais_bench --model=dqn_bs1.om --input bin_path --output result --outfmt BIN --batchsize 1 ``` - 参数说明 @@ -233,7 +217,7 @@ DQN其实是深度学习和强化学习知识的结合,也就是用Deep Networ 进行后处理并将处理得到的数据进行精度对比 ``` - python3.7 dqn_postprocess.py --pth-path='dqn.pth' --state-path='state_path' --outbin-path='result/2022_11_8_23_23_50' --num=20 + python3 dqn_postprocess.py --pth-path='dqn.pth' --state-path='state_path' --outbin-path='result/2022_11_8_23_23_50' --num=20 ``` - 参数说明: @@ -248,7 +232,7 @@ DQN其实是深度学习和强化学习知识的结合,也就是用Deep Networ 可使用ais_bench推理工具的纯推理模式验证不同batch_size的om模型的性能,参考命令如下: ``` - python3.7 -m ais_bench --model=dqn_bs1.om --loop=20 --batchsize 1 + python3 -m ais_bench --model=dqn_bs1.om --loop=20 --batchsize 1 ``` - 参数说明 diff --git a/ACL_PyTorch/contrib/rl/c51/README.md b/ACL_PyTorch/contrib/rl/c51/README.md index d3615beee9f85b57730cc2cac70a85f5ecc36937..72c26689f1e47b9580c0a7e78e6f447484bb740a 100644 --- a/ACL_PyTorch/contrib/rl/c51/README.md +++ b/ACL_PyTorch/contrib/rl/c51/README.md @@ -5,8 +5,6 @@ - [输入输出数据](#section540883920406) -- [推理环境准备](#ZH-CN_TOPIC_0000001126281702) - - [快速上手](#ZH-CN_TOPIC_0000001126281700) - [获取源码](#section4622531142816) @@ -56,20 +54,6 @@ C51是一种值分布强化学习算法,C51算法的框架依然是DQN算法 | -------- | -------- | ---------- | ------------ | | output | FLOAT32 | 1 x 4 x 51 | ND | - -# 推理环境准备 - -- 该模型需要以下插件与驱动 - - **表 1** 版本配套表 - -| 配套 | 版本 | 环境准备指导 | -| ---------- | ------- | ----------------------- | -| 固件与驱动 | 22.0.2 | [Pytorch框架推理环境准备](https://www.hiascend.com/document/detail/zh/ModelZoo/pytorchframework/pies) | -| CANN | 6.0.0 | - | -| Python | 3.7.5 | - | -| PyTorch | 1.8.0 | - | - # 快速上手 ## 获取源码