"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "3a278d701d3a0bba25ad52891653330ece2cb472"
Add an extract_features option for LSTMDecoder
Summary: This diff adds a new option to the LSTMDecoder to obtain unprojected decoder outputs (before the final output projection layer). The original forward() method remains unchanged, but is divided into two parts: extract_features() and output_layer(). extract_features() outputs the hidden states of the decoder, which offers more flexibility to the model. For instance, the unprojected decoder outputs are needed to implement a copy pointer attention that uses the decoder output to determine whether to copy certain tokens from the source sequence. Reviewed By: myleott Differential Revision: D18650255 fbshipit-source-id: 321c3085676d98b8b4f4ad6102917c94800643a5
Showing
Please register or sign in to comment