From 074b2aa5629c9dbbadf4b9dbea6d6531fa4f46d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=94=A6=E6=98=8E?= <532925744@qq.com>
Date: Wed, 31 Aug 2022 07:41:21 +0000
Subject: [PATCH] fix issue I5OMSN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: 寰愰敠鏄� <532925744@qq.com>
---
 official/nlp/lstm/README.md     | 2 +-
 official/nlp/lstm/README_CN.md  | 2 +-
 official/nlp/lstm/preprocess.py | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/official/nlp/lstm/README.md b/official/nlp/lstm/README.md
index 01c3055c8..5ae345ca4 100644
--- a/official/nlp/lstm/README.md
+++ b/official/nlp/lstm/README.md
@@ -419,7 +419,7 @@ Ascend:
 python export.py --ckpt_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] --config_path [YAML_CONFIG_PATH]
 ```
 
-- `weight.txt` is required, please generate it by run preprocess.py. Then you will see this file in /preprocess.
+- `weight.txt` is required, it will be generated with mindrecords by training model.
 - `ckpt_file` parameter is required.
 - `FILE_FORMAT` should be in ["AIR", "MINDIR", "ONNX"].
 - `YAML_CONFIG_PATH` default is `default_config.yaml`.
diff --git a/official/nlp/lstm/README_CN.md b/official/nlp/lstm/README_CN.md
index 7972a64fb..fb7e133b5 100644
--- a/official/nlp/lstm/README_CN.md
+++ b/official/nlp/lstm/README_CN.md
@@ -421,7 +421,7 @@ Ascend:
 python export.py --ckpt_file [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] --config_path [YAML_CONFIG_PATH]
 ```
 
-- `weight.txt` 鏂囦欢鍦ㄥ鍑鸿剼鏈腑瑕佺敤鍒帮紝闇€瑕佽繍琛宲reprocess.py鏂囦欢鐢熸垚銆�
+- `weight.txt` 鏂囦欢闇€瑕佸湪璁粌妯″瀷鏃惰幏寰椼€�
 - `ckpt_file` 鏄繀闇€鐨勩€�
 - `FILE_FORMAT` 蹇呴』鍦� ["AIR", "MINDIR", "ONNX"]涓繘琛岄€夋嫨銆�
 - `YAML_CONFIG_PATH` 榛樿鏄� `default_config.yaml`銆�
diff --git a/official/nlp/lstm/preprocess.py b/official/nlp/lstm/preprocess.py
index 6a1b82e98..9c39fd03b 100644
--- a/official/nlp/lstm/preprocess.py
+++ b/official/nlp/lstm/preprocess.py
@@ -18,13 +18,12 @@
 import os
 import numpy as np
 
-from src.dataset import lstm_create_dataset, convert_to_mindrecord
+from src.dataset import lstm_create_dataset
 from src.model_utils.config import config
 
 
 if __name__ == '__main__':
     print("============== Starting Data Pre-processing ==============")
-    convert_to_mindrecord(config.embed_size, config.aclimdb_path, config.preprocess_path, config.glove_path)
     dataset = lstm_create_dataset(config.preprocess_path, config.batch_size, training=False)
     img_path = os.path.join(config.result_path, "00_data")
     os.makedirs(img_path)
-- 
GitLab