GithubHelp home page GithubHelp logo

adem's Introduction

This repository has the code and parameters used for the ADEM model in:

Towards an Automatic Turing Test: Learning to Evaluate Dialogue Responses
Ryan Lowe, Michael Noseworthy, Iulian V. Serban, Nicolas Angelard-Gontier, Yoshua Bengio, and Joelle Pineau

Due to the ethics policy for this project, we cannot release the collected human data at this time. However, we do provide the weights/parameters for a trained model and the code to train ADEM with new data.

ADEM uses the VHRED model. A modified version of the code is included in this repo. The original repo and paper can be found at:
https://github.com/julianser/hed-dlg-truncated
https://arxiv.org/abs/1605.06069

You will need to download the weights for the pretrained VHRED model before running the code. Once downloaded from the following link, place all the files in the ./vhred folder.
https://drive.google.com/file/d/0B-nb1w_dNuMLY0Fad3N1YU9ZOU0/view?usp=sharing

An example of running ADEM can be found in interactive.py:
THEANO_FLAGS='device=gpu0,floatX=float32' python interactive.py

adem's People

Contributors

noseworm 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  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  avatar  avatar  avatar  avatar  avatar

adem's Issues

Questions about input format

Hi, I have tried to use this code to evaluate the dialog models. However, when I apply Adem on the instances in the paper "Towards an Automatic Turing Test: Learning to Evaluate Dialogue Responses", I find that the output results are different from the results shown in the paper. Here are some examples of my experiments:
context: [ <first_speaker> photo to see my television debut go to - some. some on- hehe! <second_speaker> it really was you? i thought ppl were recognizing someone who looked like you! were the oysters worth the wait? ]
true: [ <first_speaker> yeah it was me . haha i’d kinda forgotten about it it was filmed a while ago ]
model: [ <first_speaker> i’m not sure. i just don’t know what to do with it. ]
score in my experiment:3.26289914095
score in the paper:1.602

The code I use is as follows:

from models import *
from preprocess import Preprocessor
import sys
saved_model = './weights/adem_model.pkl'
if __name__ == '__main__':
        pp = Preprocessor()
        adem = ADEM(pp, None, saved_model)
        f=open(sys.argv[1],'r')
        fw=open(sys.argv[1]+'.eval','w')
        context=[]
        true=[]
        model=[]
        for line in f:
                lines=line.strip().split('\t')
                if(len(lines)!=4 or len(lines[2])<=5):
                        continue
                context.append(lines[0])
                true.append(lines[1])
                model.append(lines[2])
        print 'Model Loaded!'
        final_score= adem.get_scores(context, true, model)
        for i in range(len(final_score)):
                fw.write(context[i]+'\t'+model[i]+'\t'+str((final_score[i]))+'\n')

The input file is as follows:

image

Is there something wrong with my input format? Could you please help me figure out why there is such a big difference between scores in my experiment and scores in the paper? Thanks!

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.