hotpotqa / hotpot

Apache License 2.0
445 stars 75 forks source link

what is start_mapping? #13

Closed Jasperty closed 5 years ago

Jasperty commented 5 years ago

hi, i have some questions about support prediction:

  1. what is the meaning of start_mapping, its shape is (batch, max_para_limit, max_sent_num), why not (batch, max_sent_num)?

  2. on the model of support prediction, i cannot understand these code: 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]) sp_output = torch.cat([start_output, end_output], dim=-1) sp_output_t = self.linear_sp(sp_output) sp_output_aux = Variable(sp_output_t.data.new(sp_output_t.size(0), sp_outputt.size(1), 1).zero()) predict_support = torch.cat([sp_output_aux, sp_output_t], dim=-1).contiguous()

tomtang110 commented 5 years ago

Hi I have the same questions? I still do not understand what is start_mapping and end_mapping. According their shape [batch_size, paragraph_limit, max_sent_num], I would like to know what is the max_sent_num. Or what delegates do the config.sent_limit? kind regards Tang