Skip to content
Permalink
Browse files

fix bugs in naqanet (#2604)

  • Loading branch information
haonan-li authored and matt-gardner committed Mar 14, 2019
1 parent c163b63 commit 55458f51e63a4e7d9e18db2710bbef3789586672
Showing with 3 additions and 3 deletions.
  1. +3 −3 allennlp/models/reading_comprehension/naqanet.py
@@ -94,7 +94,7 @@ def __init__(self, vocab: Vocabulary,
hidden_dims=[modeling_out_dim, 1],
num_layers=2)

if "question_span_extraction" in answering_abilities:
if "question_span_extraction" in self.answering_abilities:
self._question_span_extraction_index = self.answering_abilities.index("question_span_extraction")
self._question_span_start_predictor = FeedForward(modeling_out_dim * 2,
activations=[Activation.by_name('relu')(),
@@ -107,15 +107,15 @@ def __init__(self, vocab: Vocabulary,
hidden_dims=[modeling_out_dim, 1],
num_layers=2)

if "addition_subtraction" in answering_abilities:
if "addition_subtraction" in self.answering_abilities:
self._addition_subtraction_index = self.answering_abilities.index("addition_subtraction")
self._number_sign_predictor = FeedForward(modeling_out_dim * 3,
activations=[Activation.by_name('relu')(),
Activation.by_name('linear')()],
hidden_dims=[modeling_out_dim, 3],
num_layers=2)

if "counting" in answering_abilities:
if "counting" in self.answering_abilities:
self._counting_index = self.answering_abilities.index("counting")
self._count_number_predictor = FeedForward(modeling_out_dim,
activations=[Activation.by_name('relu')(),

0 comments on commit 55458f5

Please sign in to comment.
You can’t perform that action at this time.