Skip to content

wzyonggege/RNN_poetry_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

RNN_poetry_generator

基于RNN生成古诗

环境

  • python3.6
  • tensorflow 1.2.0

使用

  • 训练:

python poetry_gen.py --mode train

  • 生成:

python poetry_gen.py 或者 python poetry_gen.py --mode sample

  • 生成藏头诗:

python poetry_gen.py --mode sample --head 明月别枝惊鹊

生成藏头诗 ---> 明月别枝惊鹊

明年襟宠任,月出画床帘。别有平州伯性悔,枝边折得李桑迷。惊腰每异年三杰,鹊出交钟玉笛频。

帮助

python poetry_gen.py --help

usage: poetry_gen.py [-h] [--mode MODE] [--head HEAD]

optional arguments: -h, --help show this help message and exit --mode MODE usage: train or sample, sample is default --head HEAD 生成藏头诗

Releases

No releases published

Packages

No packages published

Languages