未验证 提交 a5277a93 编写于 作者: L Lv Xiao 提交者: GitHub
上级 5f1ff9b9
...@@ -115,8 +115,8 @@ model_path = "models/rnn_lm_pass_00000.tar.gz" `` ...@@ -115,8 +115,8 @@ model_path = "models/rnn_lm_pass_00000.tar.gz" ``
3. ```max_gen_len``` : Specify the maximum length of each sentence generated. If the model cannot generate ```<e>```, the generation process will automatically terminate when ```max_gen_len``` words are generated. 3. ```max_gen_len``` : Specify the maximum length of each sentence generated. If the model cannot generate ```<e>```, the generation process will automatically terminate when ```max_gen_len``` words are generated.
4. ```beam_size``` : The width of each step of the Beam Search algorithm. 4. ```beam_size``` : The width of each step of the Beam Search algorithm.
5. ```model_path``` : Specify the path to the trained model. 5. ```model_path``` : Specify the path to the trained model.
Among them, the gen_file holds the text prefix to be generated, and each prefix is in one line. The format is as follows: Among them, the gen_file holds the text prefix to be generated, and each prefix is in one line. The format is as follows:
```若隐若现 地像 幽灵 , 像 死神``` ```若隐若现 地像 幽灵 , 像 死神```
Write the text prefix to be generated into the file in this format; Write the text prefix to be generated into the file in this format;
* Run the ```python generate.py``` command to run the beam search algorithm to generate the text for the input prefix. Here are the results generated by the model : * Run the ```python generate.py``` command to run the beam search algorithm to generate the text for the input prefix. Here are the results generated by the model :
```81 若隐若现 地像 幽灵 , 像 死神 ```81 若隐若现 地像 幽灵 , 像 死神
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册