2f337387d6759627bae60284e7fa612268580724,mmf/models/mmf_transformer.py,MMFTransformerEmbeddings,forward,#MMFTransformerEmbeddings#,155
Before Change
if modality.key in segment_ids:
total_embedding += self.token_type_embeddings(segment_ids[modality.key])
layer_norm_layer = getattr(self, modality.key + "_layer_norm")
dropout_layer = getattr(self, modality.key + "_dropout")
list_embeddings.append(dropout_layer(layer_norm_layer(total_embedding)))
return torch.cat(list_embeddings, dim=1)
After Change
self.token_embeddings,
self.pos_embeddings,
self.layer_norms,
self.dropouts,
)
):
modality_name = self.modality_keys[idx]
total_embedding = token_emb(input_ids[modality_name])
if modality_name in position_ids:
total_embedding += pos_emb(position_ids[modality_name])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: facebookresearch/pythia
Commit Name: 2f337387d6759627bae60284e7fa612268580724
Time: 2020-09-15
Author: vedanujg@gmail.com
File Name: mmf/models/mmf_transformer.py
Class Name: MMFTransformerEmbeddings
Method Name: forward
Project Name: facebookresearch/pythia
Commit Name: 2f337387d6759627bae60284e7fa612268580724
Time: 2020-09-15
Author: vedanujg@gmail.com
File Name: mmf/models/mmf_transformer.py
Class Name: MMFTransformerEmbeddings
Method Name: forward
Project Name: ilastik/ilastik
Commit Name: 9d5812a8a844ac6bada7fdd81bc1ae1308c3fca0
Time: 2019-07-10
Author: tomaz.vieira@embl.de
File Name: ilastik/applets/dataSelection/datasetInfoEditorWidget.py
Class Name: DatasetInfoEditorWidget
Method Name: __init__
Project Name: ilastik/ilastik
Commit Name: cd7dfe55a56b2eb53dcd61e1db27aad0da1db301
Time: 2019-07-10
Author: tomaz.vieira@embl.de
File Name: ilastik/applets/dataSelection/datasetInfoEditorWidget.py
Class Name: DatasetInfoEditorWidget
Method Name: __init__