a7b0ffb1a047f855762d4e76acd7b8bffc7202f0,projects/personality_captions/transresnet/modules.py,TransresnetModel,_build_text_encoder,#TransresnetModel#Any#,149
Before Change
self.dictionary, self.opt["embedding_size"], self.opt["datapath"]
)
self.text_encoder = TransformerEncoder(
n_heads=self.opt["n_heads"],
n_layers=self.opt["n_layers"],
embedding_size=self.opt["embedding_size"],
ffn_size=self.opt["ffn_size"],
vocabulary_size=len(self.dictionary),
embedding=self.embeddings,
dropout=self.opt["dropout"],
attention_dropout=self.opt["attention_dropout"],
relu_dropout=self.opt["relu_dropout"],
padding_idx=self.dictionary.tok2ind[self.dictionary.null_token],
learn_positional_embeddings=self.opt["learn_positional_embeddings"],
embeddings_scale=False,
n_positions=self.opt["n_positions"],
activation=self.opt["activation"],
variant=self.opt["variant"],
n_segments=self.opt["n_segments"],
)
if self.opt.get("load_encoder_from") is not None:
self._load_text_encoder_state()
self.additional_layer = LinearWrapper(
After Change
self.dictionary, self.opt["embedding_size"], self.opt["datapath"]
)
self.text_encoder = TransformerEncoder(
opt=self.opt,
embedding=self.embeddings,
vocabulary_size=len(self.dictionary),
padding_idx=self.dictionary.tok2ind[self.dictionary.null_token],
embeddings_scale=False,
)
if self.opt.get("load_encoder_from") is not None:
self._load_text_encoder_state()
self.additional_layer = LinearWrapper(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 18
Instances
Project Name: facebookresearch/ParlAI
Commit Name: a7b0ffb1a047f855762d4e76acd7b8bffc7202f0
Time: 2021-03-04
Author: spencerpoff@gmail.com
File Name: projects/personality_captions/transresnet/modules.py
Class Name: TransresnetModel
Method Name: _build_text_encoder
Project Name: facebookresearch/ParlAI
Commit Name: a7b0ffb1a047f855762d4e76acd7b8bffc7202f0
Time: 2021-03-04
Author: spencerpoff@gmail.com
File Name: projects/image_chat/transresnet_multimodal/modules.py
Class Name: TransresnetMultimodalModel
Method Name: _build_context_encoder
Project Name: facebookresearch/ParlAI
Commit Name: a7b0ffb1a047f855762d4e76acd7b8bffc7202f0
Time: 2021-03-04
Author: spencerpoff@gmail.com
File Name: parlai/agents/transformer/crossencoder.py
Class Name: CrossEncoderModule
Method Name: __init__