diff --git a/08.machine_translation/README.cn.md b/08.machine_translation/README.cn.md index 7457383100696b71cf3e8898a92c784dcfe030ee..ffd499bda3924886e3dc486cae251ac7458071c5 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 e15733821e51b1e3f44ec808fb49e3af94736c28..57a586290e2e85f7a03871428090a5aa08f9cfc6 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 252f896e6f9661b48d2e38d9a9a331dab71de95a..4504a15932cba5f60d17bf07f0197b41f8c76fdd 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 6796e1a86151756abd04bb4876c5e6fdc1baaad2..c9996d64f8d6e722f2d85aa13d3dbe950f87d7e9 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 77987e930d236d4ef3febdd912d5a736e1b0ccd8..290d8e8f3ef461911634511a166a64e96817efc1 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:")