Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 4e44097

Browse files
authored
Add scalar_mix_parameters to ElmoTokenEmbedder.from_params (#1956)
Sorry, continuation of #1955 . Was able to run a model with this setting, so pretty sure I got it right this time around...
1 parent 0264002 commit 4e44097

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

allennlp/modules/token_embedders/elmo_token_embedder.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@ def from_params(cls, vocab: Vocabulary, params: Params) -> 'ElmoTokenEmbedder':
114114
else:
115115
vocab_to_cache = None
116116
projection_dim = params.pop_int("projection_dim", None)
117+
scalar_mix_parameters = params.pop('scalar_mix_parameters', None)
117118
params.assert_empty(cls.__name__)
118119
return cls(options_file=options_file,
119120
weight_file=weight_file,
120121
do_layer_norm=do_layer_norm,
121122
dropout=dropout,
122123
requires_grad=requires_grad,
123124
projection_dim=projection_dim,
124-
vocab_to_cache=vocab_to_cache)
125+
vocab_to_cache=vocab_to_cache,
126+
scalar_mix_parameters=scalar_mix_parameters)

0 commit comments

Comments
 (0)