- Tensorflow r1.0.1
- Python 2.7
- CUDA 7.5+ (For GPU)
Apply Generative Adversarial Nets to generating sequences of discrete tokens.
The illustration of SeqGAN. Left: D is trained over the real data and the generated data by G. Right: G is trained by policy gradient where the final reward signal is provided by D and is passed back to the intermediate action value via Monte Carlo search.
The research paper SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient has been accepted at the Thirty-First AAAI Conference on Artificial Intelligence (AAAI-17).
(本家のレポジトリより引用)
$ python timeline.py
でNON STYLE 石田の「おはようございます。みなさんの」から始まるツイートを全て取ってこれます。
出力先はsave/raw_tweet.py
他のアカウントからツイートを持ってきたければ、24行目と48行目の"screen_name"を任意のアカウント名の@以下に変えて、
39〜41行目を削除して使ってください。
$ python datacleaner.py
save/raw_tweet.py
からURLを除去後、形態素解析をMeCabで行います。
出力先はsave/parsed_tweet.py
$ python sequence_gan.py