GithubHelp home page GithubHelp logo

dme's People

Contributors

douwekiela avatar kahne avatar stephenroller 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dme's Issues

Code for CDME?

Thanks for this great repo. Is the code for CDME going to be available?

SNLI checkpoint incompatible

I believe the checkpoint for DME you provide is incompatible with the model that is constructed using SNLI data for task=snli. Mainly, the vocabulary somehow mismatches and doesn't allow the checkpoint's outermost layers, for embeddings, to be loaded into the model so constructed. Of course, we could train our model using the script, but just thought I should mention this in case more people are facing the same issue.

Link to Arxiv

I see that the readme links to the corresponding Arxiv paper. Please update the link to point to the HTML abstract, i.e. to https://arxiv.org/abs/1804.07983 , and not to the PDF. Some readers merely want to read the abstract only. If they want the PDF, they can easily click on the PDF link on the Arxiv HTML page.

Removing UNK words from sentence ? why ?

@kahne

DME/train.py

Line 67 in a3217ee

text_field = data.Field(include_lengths=True, init_token='<s>', eos_token='</s>', preprocessing=filter_by_emb_vocab)

why filtering out the words based on the combined embedding vocabulary in the preprocessing function ? instead of replacing with <unk> ?

For exapmle :

sentence : hide new secretions from the parental units

if the word secretions is not in the emb_vocab ,
the sentence will be converted into hide new from the parental units ,
I think correct sentence should be hide new <unk> from the parental units

mismatch on the attention formula in the paper and implementation

Hi, thanks for sharing the code! It really helped me understanding the paper.
I have a question on the way you calculate the attention score, especially on where to apply softmax on.
2018-12-07 17 13 55

From this, it seems that the softmax function(g) takes as input "word vectors" FROM TIME STEP 1 TO S, meaning that alpha distribution over the SEQUENCE, not on NUMBER OF PRETRAINED VECTORS.

DME/dme/embedders.py

Lines 183 to 203 in 97631c4

def forward(self, words):
projected = [self.projectors[name](self.embedders[name](words)) for name in self.emb_names]
if self.args.attnnet == 'none':
out = sum(projected)
else:
projected_cat = torch.cat([p.unsqueeze(2) for p in projected], 2)
s_len, b_size, _, emb_dim = projected_cat.size()
attn_input = projected_cat
if self.args.attnnet.startswith('dep_'):
attn_input = attn_input.view(s_len, b_size * self.n_emb, -1)
self.m_attn = self.attn_1(self.attn_0(attn_input)[0])
self.m_attn = self.m_attn.view(s_len, b_size, self.n_emb)
elif self.args.attnnet.startswith('no_dep_'):
self.m_attn = self.attn_1(self.attn_0(attn_input)).squeeze(3)
if self.args.attnnet.endswith('_gating'):
self.m_attn = torch.sigmoid(self.m_attn)
elif self.args.attnnet.endswith('_softmax'):
self.m_attn = F.softmax(self.m_attn, dim=2)

However, line 203 takes softmax over dim=2, which is NUMBER OF PRETRAINED VECTORS(self.n_emb).

I am little confused about the mismatch here. I think the formula on the paper should be revised. Am I missing something? Please help me!

Support Python 3

The readme mentions Python 2 which is almost obsolete. Please upgrade to and formally support Python 3.7 which is the current version. Python 2 code cannot be readily integrated into modern codebases.

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.