GithubHelp home page GithubHelp logo

copynet's People

Contributors

adamklec 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

Watchers

 avatar  avatar  avatar  avatar

copynet's Issues

pt file?

Trouble ask next, "pt" file is what ah, where to download?Thank you very much!

Could you please give us the data files? so that we can rerun this code.

Thanks for sharing the code. when I try to run this code, I create the datasets follow your description, Each file should have 2 lines of text. The first is the input sequence, the second is the target output sequence. But the error notices that lacking the file of cleaned_first_names.txt , so Could you please give us the data files? so that we can rerun this code. thanks again!

Issue with gen_scores and copy_scores computation

Code starts here


transformed_hidden2 = self.copy_W(output).view(batch_size, self.hidden_size, 1)
copy_score_seq = torch.bmm(encoder_outputs, transformed_hidden2) # this is linear. add activation function before multiplying.
copy_scores = torch.bmm(torch.transpose(copy_score_seq, 1, 2), one_hot_input_seq).squeeze(1) # [b, vocab_size + seq_length]
missing_token_mask = (one_hot_input_seq.sum(dim=1) == 0) # tokens not present in the input sequence
missing_token_mask[:, 0] = 1 # tokens are not part of any sequence
copy_scores = copy_scores.masked_fill(missing_token_mask, -1000000.0)

gen_scores = self.out(output.squeeze(1)) # [b, vocab_size]
gen_scores[:, 0] = -1000000.0 # penalize tokens in generate mode too`


I have some issues with your above computation of copy_scores and gen_scores. Please let me know if I am wrong anywhere.

1.) In the computation of copy_scores, it is mentioned in the paper to multiply encoder_outputs with a weight matrix and apply activation function and then, multiply with the decoder RNN's hidden state. But your code seems to be doing totally different i.e. multiplying weight matrix with output of decoder RNN and multiplying the result with encoder_outputs. There is no non-linearity here.

2.) In the gen_scores computation, your code multiplies the output to a weight matrix where as in the paper, it is mentioned to compute the way it's done in Attention RNN encoder-decoder but between the one-hot encoding of word and the decoder RNN's hidden state. This is totally different from your implementation.

Can you please let me know if I misunderstood anything?

Thanks in advance!

code is not working at all

Hi
The code is not working at all, I get several errors in evalute, could you put a data please, make a minimal example of working code?
thanks

does this code work at all?

Hi
I am training this model, I see blue score goes up and down all the time, val losses as well, does this code work at all? thanks

Result

Hi, thanks for your code, have your ever test the model on any dataset and achieve the same performance ?
Emmm, thank you.

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.