GitHub - DongjunLee/char-rnn-tensorflow: Multi-layer Recurrent Neural Networks f...
source link: https://github.com/DongjunLee/char-rnn-tensorflow
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
char-rnn
This code implements multi-layer Recurrent Neural Network (RNN, LSTM, and GRU) for training/sampling from character-level language models.
Requirements
- Python 3.6
- TensorFlow 1.4
- hb-config
Features
Using Higher-APIs in TensorFlow
- Korean SamhangSi (like acrostic poem)
Config
example: check_tiny.yml
data: data_dir: 'data/tiny_lyricskor' model: batch_size: 4 input_keep_prob: 0.8 log_dir: 'logs' num_layers: 1 output_keep_prob: 0.8 rnn_size: 64 seq_length: 20 train: train_steps: 10000 model_dir: 'tiny_checkpoints' save_every: 1 learning_rate: 0.001 loss_hook_n_iter: 100 check_hook_n_iter: 1000 min_eval_frequency: 100
Usage
First, check if the model is valid.
python main.py --config check_tiny --mode train
Then, train the model
python main.py --config kor_ballad --mode train_and_evaluate
After training, generate Korean Samhangsi.
python generator.py --config kor_ballad --word 삼행시
Samhangsi Examples
삼이야 그리움이 좇아 사랑은늘 도망가
행른 잊어버리고 그대 이 세상
시제 너의 곁을 떠나면 빗물에 꽃씨하나 흘러가듯
기를 바라보네 두 손 잡고 고개 끄덕여 달라 하기에
계 울고 싶어 내 맘을 떠나가던 날
여도 지금하럼 커피는 날개니
름다웠던 그대모습 다시 볼 수 없는것 알아요
커나가 그래 돌아서 눈 감으면 잊을까
피고 내가 가고 싶지 아파 만날 날 기다려왔어
Example with kino-bot
Reference
Recommend
-
150
transformer TensorFlow implementation of Attention Is All You Need. (2017. 6)
-
17
The main objective of this post is to implement an RNN from scratch and provide an easy explanation as well to make it useful for the readers. Implementing any neural network from scratch at least once is a valuable exerc...
-
42
Recurrent Neural Networks (RNN) Explained — the ELI5 way
-
34
Recurrent Neural Networks Explained An entertaining and illustrated guide to understand the intuition.
-
14
Understand the intuition behind RNN!
-
3
I enjoyed reading Andrej Karpathy’s The Unreasonable Effectiveness of Recurrent Neural Networks lately – it’s got some fascinating examples and some good explanati...
-
1
Convolutional Neural Networks with Recurrent Neural Filters Author: Yi Yang Contact: [email protected] Basic description This is the Python implementation of the...
-
3
Recurrent Neural Networks for Collaborative Filtering 2014-06-28I’ve been spending quite some time lately playing around with RNN’s for collaborative filtering. RNN’s are models that predict a sequence of something. The be...
-
10
记录一下,很久之前看的论文-基于RNN来从微博中检测谣言及其代码复现。 1 引言 现有传统谣言检测模型使用经典的机器学习算法,这些算法利用了根据帖子的内容、用户特征和扩散模式手工制作的各种特征,或者简单地利用
-
4
Turing Machines are Recurrent Neural Networks Proceedings of STeP'96. Jarmo Alander, Timo Honkela and Matti Jakobsson (eds.), Publications of the Finnish Artificial Intelligence Society, pp. 13-24. Turi...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK