GithubHelp home page GithubHelp logo

shubhamagarwal92 / mmd Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 5.0 84 KB

This repository contains the Pytorch implementation for our SCAI (EMNLP-2018) submission "A Knowledge-Grounded Multimodal Search-Based Conversational Agent"

Python 87.69% Shell 12.31%
mmd multimodal-deep-learning pytorch visual-dialog

mmd's Introduction

Hello world! ๐Ÿ’ป

I am Shubham, rather his Github page ๐Ÿค– ๐Ÿ˜Ž. I don't know how you landed here ยฏ\_(ใƒ„)_/ยฏ ๐Ÿง but nice to e-meet you :trollface: ๐Ÿค“.

I am passionate about cool research ๐Ÿ”ฅ ๐Ÿ’ก ๐Ÿ”ฌ. To know more about my recent work, please head to my homepage ๐Ÿ”Ž ๐Ÿ’ผ.

If you would like to discuss things, feel free to reach out. You can also follow me on Twitter to see the things I am interested in. We can go out for a โ˜• / ๐Ÿต .


shubhamagarwal92 on twitter shubhamagarwal92 on stackoverflow shubhamagarwal92 on google scholar shubhamagarwal92 on github

shubhamagarwal92 on linkedin



What do I need?

ย ย ย ย ย ย ย ย ย ย ย 

My github stats

visitor badge

mmd's People

Contributors

githwd2016 avatar shubhamagarwal92 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mmd's Issues

model.eval() in train.py

In train.py method evaluate, I find you use model.eval() to disable dropout. However, after evaluate, I didn't find model.train() to enable dropout. It seems that once evaluate called, dropout will be disabled. Does this influence final performance?

Training Time

Thank you for sharing the code.
Can you tell me how much time training takes?

dimensions mismatch error in translate.py

@githwd2016 @shubhamagarwal92
I have trained the model and save the checkpoint. whereas I am trying to run again bash train_and _translate.sh with IS TRAIN to 'No', which means for translation, I got following error: can anybody help me to rectify this:

File "translate.py", line 212, in
main(args)
File "translate.py", line 139, in main
model.load_state_dict(torch.load(args.checkpoint_path))
File "/home/mauajamapcs16/anaconda2/envs/mmd/lib/python2.7/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for MultimodalHRED:
While copying the parameter named "context_encoder.contextRNN.weight_ih_l0", whose dimensions in the model are torch.Size([1536, 768]) and whose dimensions in the checkpoint are torch.Size([1536, 1024]).

Thanks in advance ..

some issues in data processing

There are some issues in data processing:

  • I downloaded dataset and extracted it into the data folder ($PROJECT_DIR/data). For detail, the data folder is like below:
mmd/data
โ”œโ”€โ”€ dataset
ย ย  โ”œโ”€โ”€ v1
ย ย  โ”‚ย ย  โ”œโ”€โ”€ test
ย ย  โ”‚ย ย  โ”œโ”€โ”€ train
ย ย  โ”‚ย ย  โ””โ”€โ”€ valid
 ย  โ””โ”€โ”€ v2
ย ย      โ”œโ”€โ”€ test
ย ย      โ”œโ”€โ”€ train
 ย      โ””โ”€โ”€ valid

But when I run dialogue_data.sh, it didn't work. I looked at your code. I think we should fix at line 31.
export DATA_DIR=$PARENT_DIR/data/ --> export DATA_DIR=$PARENT_DIR/data/dataset/$DATA_VERSION

  • Besides, in file train_and_translate.sh, at line 54, the default config is _v4, but in your code, you wrote _v5.

Anw, thank you so much for pytorch version of MMD.

annoy.ann file

What exactly does the annoy.ann file hold since it's almost 60GB on unzipping? Is it images or some text?

Global name HRED is not defined in translate.py

Hi,
@shubhamagarwal92 @githwd2016
Can you help me for solving this issues, i have checked the line of error and model_type for opt.model_type, it takes all the parameters but after complete training, the following error raise:

Traceback (most recent call last):
File "translate.py", line 207, in
main(args)
File "translate.py", line 105, in main
model = HRED(src_vocab_size=vocab_size,
NameError: global name 'HRED' is not defined

Thanks for help in advance

import error

Sir I have installed zomatopy using the command :
pip install zomatopy
and after that when I try executing the following commands:
import zomatopy

config={
"user_key":"ZOMATO_API_KEY"
}

zomato = zomatopy.initialize_app(config)
it gives me import error
Traceback (most recent call last):
File "zomato.py", line 1, in
import zomatopy
ImportError: No module named zomatopy
Screenshot from 2019-03-18 22-58-11

HRED in translate.py

File "translate.py", line 105, in main
model = HRED(src_vocab_size=vocab_size,.....
NameError: global name 'HRED' is not defined

Did anyone else face the HRED issue?

Some questions about data processing

In dialogue_data.py, I find this sentence: "if 'search_criteria' in utterance['utterance']:"(line 161).
However, in the data provided by Amrita Saha, utterance['utterance'] doesn't contain the key 'search_criteria' or 'compulsory_fields'. Moreover, I have run the script and find there is nothing in "train_search_criteria.txt".

Thank you in advance.

What is DATA_STATE_DIR ?

in file train_and_translate.sh
line 23: read -p "Please enter state data directory. Blank for all: " DATA_STATE_DIR
what is DATA_STATE_DIR and what input should I give in cmd line?
state

Compile errors

Dear @shubhamagarwal92,

There are some compile errors:

  • You didn't declare param args for function evaluate at line 64 but called it at line 106.
  • At line 87, Bridge class only has 2 params hidden size of encoder and decoder, but you declared 3 arguments: hidden size of encoder, decoder and activation function.
  • Besides, I got some troubles with 2 KB Encoders. I tried to run train_and_translate_shah_et_al.sh. It means that I didn't use kb encoders, but they were initialized. However, param vocab_size was assigned None value.

I think you should re-run your code with all configurations to guarantee that your code works well.

Thank you so much for your supporting.

No vocab.pkl file exits

Traceback (most recent call last):
File "train.py", line 327, in
main(args)
File "train.py", line 154, in main
vocab = pkl.load(open(args.vocab_path,'rb'))[1]
IOError: [Errno 2] No such file or directory: '/home1/mauzama/Arunav/mmd_courteous_final/data/v2/dialogue_data//context_2__20//vocab.pkl'

v4 VS v8

Can you tell me what is a performance difference between config version 4 and config version 8 ?

Thanks in advance

annoy.ann file is missing from the directory

I have downloaded the DATA Link, while training the model.

I have checked the directory, the directory contains only FileNameMapToIndex.pkl which is used as annoy_pkl_path. the file annoy.ann file is missing for which I got following error:

File "train.py", line 157, in main
annoyIndex.load(args.annoy_file_path)
IOError: [Errno 2] No such file or directory

I even checked the train_and_translate.sh in which file path is correct but there is no annoy.ann\

ANNOY_PATH = ${PWD}/data
ANNOY_FILE_PATH = $ANNOY_PATH/annoy.ann

Thanks for help in advance

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.