hotpotqa / hotpot

Apache License 2.0
445 stars 75 forks source link

Tensor split for start_output and end_output? #23

Closed Vimos closed 5 years ago

Vimos commented 5 years ago

I noticed that start_output uses the later half of sp_output

        start_output = torch.matmul(start_mapping.permute(0, 2, 1).contiguous(), sp_output[:,:,self.hidden:])
        end_output = torch.matmul(end_mapping.permute(0, 2, 1).contiguous(), sp_output[:,:,:self.hidden])

Is it OK to use the first half as start_output?

qipeng commented 5 years ago

This is us taking the state of the backward LSTM corresponding to the first token in the sentence as part of the input to predict supporting facts. You should feel free to use whatever feature you want in your extension. :)