xiongma / transformer-pointer-generator

A Abstractive Summarization Implementation with Transformer and Pointer-generator
MIT License
395 stars 79 forks source link

About a new problem using this nice code #19

Closed ha-lins closed 5 years ago

ha-lins commented 5 years ago

Hi, @policeme

Thanks for your fancy code! Your code is helpful to my recent project, which needs two source inputs(X1 and X2). I need the transformer to attend on two sources, while i only want to copy from source X1. What's your opinion about this?

A possible solution is that i use two encoders and one decoder. I only feed the encoder outputs of X1 into the last layer of the decoder, otherwise i feed the concatenation outputs of two encoders for joint attention. Do you think it can work well ? Anything wrong with the solution?

Looking forward to your insightful opinion!

xiongma commented 5 years ago

while i only want to copy from source X1, I don't understand the i.

ha-lins commented 5 years ago

sorry, 'i' should be 'I'. I only want the copy mechanism from X1