texar-pytorch icon indicating copy to clipboard operation
texar-pytorch copied to clipboard

Incorporating copy mechanism in decoder

Open roemmele opened this issue 5 years ago • 2 comments

I'm really enjoying this library, thanks for your work. Just curious, are there any plans to implement some sort of copying mechanism for decoding, e.g. CopyNet (https://arxiv.org/abs/1603.06393)?

roemmele avatar Apr 22 '20 22:04 roemmele

Thank you for using Texar! Unfortunately we don't have current plans to add built-in support for copying mechanism.

That said, given what's already in the library, it shouldn't be too difficult to implement the copying mechanism based on AttentionRNNDecoder; you would only need to modify the initialize(), step(), and next_inputs() methods: https://github.com/asyml/texar-pytorch/blob/95f3d644680656f38b7b1779f2ba184ef9e1f81a/texar/torch/modules/decoders/rnn_decoders.py#L556-L600

If you have a working implementation, you're more than welcome to create a pull request and contribute to the library!

huzecong avatar Apr 23 '20 16:04 huzecong

Ok, I may try to do that at some point. Thanks!

roemmele avatar Apr 23 '20 17:04 roemmele