Code Monkey home page Code Monkey logo

chinese_novel_generation's Introduction

Chinese Novel Generation using LSTM

使用LSTM生成中文小说的一个简单尝试.


>>>Abandoned project<<<


Dependencies

  • tensorflow 1.5+
  • numpy

本处所搭建的RNN结构

  • Input -> LSTM -> Dropout -> LSTM -> Dropout -> Fully Connected

Default HyperParameters for this model

# 训练循环次数
num_epochs = 200

# batch大小
batch_size = 256

# lstm层中包含的unit个数
rnn_size = 1024

# embedding layer的大小
embed_dim = 1500

# 训练步长
seq_length = 60

# 学习率
learning_rate = 0.001

提供两种试用方法A和B

A:这里上传了一段神雕侠侣第一章的片段sdxl1.txt,可以拿来用,使用默认的配置,跑一遍代码,直接生成一段小说文本。

B: 把txtpath改成自己定义的待输入的小说片段文本文档的地址,然后根据个人需求处理原始文本数据,以及修改模型超参数,然后训练模型,跑一遍。

TIPS

这个模型不是很easy,最好使用算力较强的机器来跑哦。

chinese_novel_generation's People

Contributors

dynmi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.