Skip to content

Commit

Permalink
Merge pull request apachecn#559 from jiangzhonglian/master
Browse files Browse the repository at this point in the history
更新:实战项目 4 古诗词自动生成
  • Loading branch information
jiangzhonglian authored Dec 3, 2019
2 parents e6ddd16 + 86e80f1 commit 19f4282
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@
* [Kears 快速入门](docs/TensorFlow2.x/Keras快速入门.md)
* [实战项目 1 电影情感分类](docs/TensorFlow2.x/实战项目_1_电影情感分类.md)
* [实战项目 2 汽车燃油效率](docs/TensorFlow2.x/实战项目_2_汽车燃油效率.md)
* [实战项目 优化: 过拟合,欠拟合](docs/TensorFlow2.x/实战项目优化_过拟合和欠拟合.md)
* [实战项目 3 优化 过拟合和欠拟合](docs/TensorFlow2.x/实战项目_3_优化_过拟合和欠拟合.md)
* [实战项目 4 古诗词自动生成](docs/TensorFlow2.x/实战项目_4_古诗词自动生成.md)

## 3.自然语言处理

Expand Down
5 changes: 5 additions & 0 deletions docs/TensorFlow2.x/实战项目_4_古诗词自动生成.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 实战项目 4 古诗词自动生成

* 代码: src/py3.x/tensorflow2.x/text_gru.py

后续慢慢更新
14 changes: 14 additions & 0 deletions src/py3.x/tensorflow2.x/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# *-* coding:utf-8 *-*
'''
@author: ioiogoo
@date: 2018/1/31 19:28
'''


class Config(object):
poetry_file = 'poetry.txt'
weight_file = 'poetry_model.h5'
# 根据前六个字预测第七个字
max_len = 6
batch_size = 512
learning_rate = 0.001
Loading

0 comments on commit 19f4282

Please sign in to comment.