avinsit123 / keyphrase-gan

Code for the AAAI 2020 paper "Keyphrase Generation for Scientific Articles using GANs"
https://aaai.org/ojs/index.php/AAAI/article/view/7238
MIT License
60 stars 10 forks source link

Which specific model to use as generator? #5

Closed peppe69 closed 4 years ago

peppe69 commented 4 years ago

I'm trying to reproduce your work, I trained the CatSeq model using the code of the original project by Hou Pong Chan and Wang Chen and Lu Wang and Irwin King (here: https://github.com/kenchan0226/keyphrase-generation-rl ), but when I run your project to train Discriminator it raises this error:

RuntimeError: Error(s) in loading state_dict for Seq2SeqModel:
    Missing key(s) in state_dict: "decoder.p_gen_linear.weight", "decoder.p_gen_linear.bias". 

Maybe I used the wrong model?

avinsit123 commented 4 years ago

Have you used the -copy_attention flag in both the training the Generator and the Discriminator. It seems that you haven't used the -copy_attention flag while training the generator.

peppe69 commented 4 years ago

Oh yes, now it works. Thank you so much!