GithubHelp home page GithubHelp logo

chin-gyou / improving-variational-encoder-decoders-in-dialogue-generation Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 9.0 35 KB

Tensorflow Implementation of Improving Variational Encoder-Decoders in Dialogue Generation

Python 100.00%

improving-variational-encoder-decoders-in-dialogue-generation's Introduction

Improving Variational Encoder-Decoders in Dialogue Generation

Description

This repository hosts the improved VEDs(Variational Encoder-Decoders) model for generative dialog modeling as described by Shen and Su et al. 2018

Creating Datasets

  1. Download the DailyDialog Corpus as released by Li, Su and Shen et al. (2017) which can be found : http://yanran.li/dailydialog.html
  2. Create the dictionary from the corpus and Serialize the dicitonary and corpus.(we give a demo convert_text2dict.py for creating pkl file)
  3. Download Word2Vec trained by GoogleNes: https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM.
  4. Changing dataproducer.py to generate tfrecord from the serialized corpus text(We use TFRecord for fast and stable training process)

Model Training

We use Tensorflow1.0 and Python2.7 for convenient.

  1. Create a new "Checkpoints" directories inside it.
  2. Change the parameters in main.py according to your GPU memeory size.
  3. Read the core code file WS_vhred.py
  4. Change and Run main.py

References

Improving Variational Encoder-Decoders in Dialogue Generation. Xiaoyu Shen, Hui Su, Shuzi Niu, Vera Demberg. 2018. AAAI https://arxiv.org/abs/1802.02032
The DailyDialog Corpus: DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset. Yanran Li, Hui Su, Xiaoyu Shen, Wenjie Li, Ziqiang Cao, Shuzi Niu. 2017. IJCNLP. https://arxiv.org/abs/1710.03957.

improving-variational-encoder-decoders-in-dialogue-generation's People

Contributors

chin-gyou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

improving-variational-encoder-decoders-in-dialogue-generation's Issues

RuntimeError: select(): index 19 out of range for tensor of size [19, 32, 30000] at dimension 0

I am new about pytorch, what's wrong about this problem?
Traceback (most recent call last): File "/home/yangjingying/PycharmProjects/VariationalSeq2Seq-master/main.py", line 269, in <module> save_every=save_every, sample_every=sample_every, print_every=print_every, learning_rate=learning_rate) File "/home/yangjingying/PycharmProjects/VariationalSeq2Seq-master/main.py", line 142, in train criterion, kl_anneal_weight, p_teach_force) File "/home/yangjingying/PycharmProjects/VariationalSeq2Seq-master/main.py", line 100, in _train_step loss.backward() File "/home/yangjingying/anaconda2/lib/python2.7/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/yangjingying/anaconda2/lib/python2.7/site-packages/torch/autograd/__init__.py", line 90, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: select(): index 19 out of range for tensor of size [19, 32, 30000] at dimension 0 Closing remaining open files:./data/train.h5...done

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.