This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def __init__(self,
74
74
self ._input_projection_layer = lambda x : x
75
75
76
76
self ._encoder_blocks = ModuleList ([])
77
- for block_index in range (num_blocks ):
77
+ for _ in range (num_blocks ):
78
78
encoder_block = QaNetEncoderBlock (hidden_dim ,
79
79
hidden_dim ,
80
80
attention_projection_dim ,
@@ -86,7 +86,6 @@ def __init__(self,
86
86
dropout_prob ,
87
87
layer_dropout_undecayed_prob ,
88
88
attention_dropout_prob )
89
- self .add_module (f"encoder_block_{ block_index } " , encoder_block )
90
89
self ._encoder_blocks .append (encoder_block )
91
90
92
91
self ._input_dim = input_dim
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def bidirectional_attention_flow_seo_2017() -> predictors.BidafPredictor:
40
40
def naqanet_dua_2019 () -> predictors .BidafPredictor :
41
41
with warnings .catch_warnings ():
42
42
warnings .simplefilter (action = "ignore" , category = DeprecationWarning )
43
- model = PretrainedModel ('https://s3-us-west-2.amazonaws.com/allennlp/models/naqanet-2019.03.01 .tar.gz' ,
43
+ model = PretrainedModel ('https://s3-us-west-2.amazonaws.com/allennlp/models/naqanet-2019.04.29-fixed-weight-names .tar.gz' ,
44
44
'machine-comprehension' )
45
45
return model .predictor () # type: ignore
46
46
You can’t perform that action at this time.
0 commit comments