Exemplo n.º 1
0
 def answer_ptr(self, output_lstm, question_out, context_len, question_len,
                is_train):
     init = attention_pooling(question_out, self.hidden_units, question_len,
                              self.keep_prob, is_train)
     logits = pointer_net_qa(output_lstm, init, context_len,
                             2 * self.hidden_units, self.keep_prob,
                             is_train)
     return logits
Exemplo n.º 2
0
 def answer_ptr(self, output_lstm, question_out, context_len, question_len,
                is_train):
     init = attention_pooling(question_out,
                              output_lstm.get_shape()[-1].value,
                              question_len,
                              dropout_keep_prob=self.keep_prob,
                              is_train=is_train)
     logits = pointer_net_qa(output_lstm,
                             init,
                             context_len,
                             init.get_shape()[-1].value,
                             dropout_keep_prob=self.keep_prob,
                             is_train=is_train)
     return logits