From 339b135108cbcec51b94c5601130dc04686b8422 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 Aug 2018 03:13:01 +0000 Subject: [PATCH] fix: fix global name not defined error. --- 08.machine_translation/README.cn.md | 1 + 08.machine_translation/README.md | 1 + 08.machine_translation/index.cn.html | 1 + 08.machine_translation/index.html | 1 + 08.machine_translation/infer.py | 1 + 5 files changed, 5 insertions(+) diff --git a/08.machine_translation/README.cn.md b/08.machine_translation/README.cn.md index 7457383..ffd499b 100644 --- a/08.machine_translation/README.cn.md +++ b/08.machine_translation/README.cn.md @@ -435,6 +435,7 @@ for data in test_data(): return_numpy=False) result_ids = np.array(results[0]) + result_ids_lod = results[0].lod() result_scores = np.array(results[1]) print("Original sentence:") diff --git a/08.machine_translation/README.md b/08.machine_translation/README.md index e157338..57a5862 100644 --- a/08.machine_translation/README.md +++ b/08.machine_translation/README.md @@ -483,6 +483,7 @@ for data in test_data(): return_numpy=False) result_ids = np.array(results[0]) + result_ids_lod = results[0].lod() result_scores = np.array(results[1]) print("Original sentence:") diff --git a/08.machine_translation/index.cn.html b/08.machine_translation/index.cn.html index 252f896..4504a15 100644 --- a/08.machine_translation/index.cn.html +++ b/08.machine_translation/index.cn.html @@ -477,6 +477,7 @@ for data in test_data(): return_numpy=False) result_ids = np.array(results[0]) + result_ids_lod = results[0].lod() result_scores = np.array(results[1]) print("Original sentence:") diff --git a/08.machine_translation/index.html b/08.machine_translation/index.html index 6796e1a..c9996d6 100644 --- a/08.machine_translation/index.html +++ b/08.machine_translation/index.html @@ -525,6 +525,7 @@ for data in test_data(): return_numpy=False) result_ids = np.array(results[0]) + result_ids_lod = results[0].lod() result_scores = np.array(results[1]) print("Original sentence:") diff --git a/08.machine_translation/infer.py b/08.machine_translation/infer.py index 77987e9..290d8e8 100644 --- a/08.machine_translation/infer.py +++ b/08.machine_translation/infer.py @@ -185,6 +185,7 @@ def decode_main(use_cuda): return_numpy=False) result_ids = np.array(results[0]) + result_ids_lod = results[0].lod() result_scores = np.array(results[1]) print("Original sentence:") -- GitLab