700abc65fd2172a2c6809dd9b72cf50fc2407772,allennlp/models/encoder_decoders/composed_seq2seq.py,ComposedSeq2Seq,__init__,#ComposedSeq2Seq#Any#Any#Any#Any#Any#Any#Any#,48
Before Change
"Selected source embedder is not an instance of `Embedding`."
)
if source_embedder.get_output_dim() != self._decoder.target_embedder.get_output_dim():
raise ConfigurationError(
f"Output Dimensions mismatch between" f"source embedder and target embedder."
)
self._source_text_embedder._token_embedders[
tied_source_embedder_key
] = self._decoder.target_embedder
initializer(self)
After Change
if self._encoder.get_output_dim() != self._decoder.get_output_dim():
raise ConfigurationError(
f"Encoder output dimension {self._encoder.get_output_dim()} should be"
f" equal to decoder dimension {self._decoder.get_out put_dim()}."
)
if tied_source_embedder_key:
// A bit of a ugly hack to tie embeddings.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: allenai/allennlp
Commit Name: 700abc65fd2172a2c6809dd9b72cf50fc2407772
Time: 2020-02-03
Author: mattg@allenai.org
File Name: allennlp/models/encoder_decoders/composed_seq2seq.py
Class Name: ComposedSeq2Seq
Method Name: __init__
Project Name: allenai/allennlp
Commit Name: 700abc65fd2172a2c6809dd9b72cf50fc2407772
Time: 2020-02-03
Author: mattg@allenai.org
File Name: allennlp/models/simple_tagger.py
Class Name: SimpleTagger
Method Name: __init__
Project Name: NervanaSystems/nlp-architect
Commit Name: b3a133bd671f6a941380d33bf4980604a237bc80
Time: 2019-10-22
Author: peter.izsak@intel.com
File Name: nlp_architect/models/transformers/token_classification.py
Class Name: XLNetForTokenClassification
Method Name: __init__