GithubHelp home page GithubHelp logo

dialogue-generation-imitation2rl's Introduction

This repository is for the code of the AAAI-2019 paper:

Dialogue Generation: From Imitation Learning to Inverse Reinforcement Learning.

Config:

TensorFlow 1.10.0 Python 3.6

Dataset:

The context-reply pairs should be saved in two different files. e.g. train.query, train.answer, dev.query, dev.answer

Run

You can find training details in file adv-shell and parameters_irl_part. You can preset some parameters in file conf.py The code structure is similar to Liu's code.

Note: This is the code based on Yu's code and Liu's code. Much appreciate.

dialogue-generation-imitation2rl's People

Contributors

wesleytao avatar

Stargazers

yuanyuanyuan avatar

dialogue-generation-imitation2rl's Issues

hope you can see this

hello ,i cloned your code
but i got some troubles as follows ,hope you can help me
this is my problem
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0] = 0 is not in [0, 0)
[[Node: disc_model/Hier_RNN_encoder/rnn/embedding_wrapper_1/embedding_lookup_18 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@disc_model/Hier_RNN_encoder/rnn/rnn/embedding_wrapper/embedding_lookup_29"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](disc_model/Hier_RNN_encoder/rnn/embedding_wrapper/embedding/read, _arg_disc_model/answer18_0_9, disc_model/Hier_RNN_encoder/rnn/embedding_wrapper_1/embedding_lookup_18/axis)]]

ValueError: Parameter output_size must be > 0: 0.

Sorry to disturb, but I need help, I met this problem:
Traceback (most recent call last):
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/irl-gan.py", line 610, in
tf.app.run()
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/irl-gan.py", line 605, in main
gen_pre_train()
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/irl-gan.py", line 71, in gen_pre_train
gens.train(gen_config)
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/generator.py", line 205, in train
model = create_model(sess, gen_config, forward_only=False, name_scope=gen_config.name_model, word2id=vocab)
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/generator.py", line 61, in create_model
model = seq2seq_model.Seq2SeqModel(gen_config, name_scope=name_scope, forward_only=forward_only)
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/gen_model.py", line 140, in init
softmax_loss_function=softmax_loss_function)
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/seq2seq.py", line 1093, in model_with_buckets
decoder_inputs[:bucket[1]])
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/gen_model.py", line 138, in
lambda x, y: seq2seq_f(x, y, tf.where(self.forward_only, True, False)),
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/gen_model.py", line 107, in seq2seq_f
mc_position=self.mc_position)
File "/home/yangjy/PycharmProjects/Dialogue-Generation-Imitation2RL-master/gen/seq2seq.py", line 727, in embedding_attention_seq2seq
cell = tf.contrib.rnn.OutputProjectionWrapper(cell, num_decoder_symbols)
File "/home/yangjy/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell.py", line 358, in init
raise ValueError("Parameter output_size must be > 0: %d." % output_size)
ValueError: Parameter output_size must be > 0: 0.

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.