rpryzant / delete_retrieve_generate

PyTorch implementation of the Delete, Retrieve Generate style transfer algorithm
MIT License
132 stars 26 forks source link

How to select sentences from candidates? #8

Closed wusj18 closed 5 years ago

wusj18 commented 5 years ago

In the paper, author said he used a separate trained classifier to choose the final sentence from all the candidates that model produced. How did you deal with this part? Thank you very much!

rpryzant commented 5 years ago

Can you point me to where that classifier is discussed in the paper?

If you're talking about the classifier in section 4.7 there may be a misunderstanding because that classifier is used for evaluation, not re-ranking candidates.

wusj18 commented 5 years ago

At the end of Section 4.4, author said "For DELETEANDRETRIEVE, similar to Guu et al. (2018), we retrieve the top-10 sentences and generate results using markers from each sentence. We then select the output with the lowest perplexity given by a separately-trained neural language model on the target-domain training data." I think this may improve the performance. Thanks for your reply

rpryzant commented 5 years ago

Ah I see thanks for pointing that out!

That feature is not implemented. So in effect we are greedily selecting and using markers from the top result for DeleteAndRetrieve.

I agree that it may improve performance. Feel free to submit it as a pull request :)

wusj18 commented 5 years ago

I will have a try, thanks again! :-)