7ce17a58e7b61b1bc2fc7384c1974e60967bd9fa,mmf/models/visual_bert.py,VisualBERT,forward,#VisualBERT#Any#,548

Before Change


        sample_list = self.add_custom_params(sample_list)
        sample_list = self.flatten_for_bert(sample_list)

        output_dict = self.model(
            sample_list.input_ids,
            sample_list.input_mask,
            sample_list.attention_mask,
            sample_list.token_type_ids,
            sample_list.visual_embeddings,
            sample_list.position_embeddings_visual,
            sample_list.visual_embeddings_type,
            sample_list.image_text_alignment,
            sample_list.masked_lm_labels,
        )

        if "pretraining" in self.config.training_head_type:
            loss_key = "{}/{}".format(
                sample_list.dataset_name, sample_list.dataset_type

After Change


        sample_list = self.add_post_flatten_params(sample_list)

        output_dict = self.model(
            sample_list["input_ids"],
            sample_list["input_mask"],
            sample_list["attention_mask"],
            sample_list["token_type_ids"],
            sample_list["visual_embeddings"],
            sample_list["visual_embeddings_type"],
            getattr_torchscriptable(sample_list, "image_text_alignment", None),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: facebookresearch/pythia
Commit Name: 7ce17a58e7b61b1bc2fc7384c1974e60967bd9fa
Time: 2020-10-13
Author: apsdehal@gmail.com
File Name: mmf/models/visual_bert.py
Class Name: VisualBERT
Method Name: forward


Project Name: facebookresearch/pythia
Commit Name: 7ce17a58e7b61b1bc2fc7384c1974e60967bd9fa
Time: 2020-10-13
Author: apsdehal@gmail.com
File Name: mmf/models/visual_bert.py
Class Name: VisualBERT
Method Name: forward


Project Name: elbayadm/attn2d
Commit Name: 8bafae2ee7044529543768eec63d8460d894f5c6
Time: 2017-10-19
Author: myleott@fb.com
File Name: fairseq/multiprocessing_trainer.py
Class Name: MultiprocessingTrainer
Method Name: _async_train_step


Project Name: OpenNMT/OpenNMT-tf
Commit Name: f76f5d2b2d4aac2cef8023b31e7fe978c1429e69
Time: 2017-10-02
Author: guillaume.klein@systrangroup.com
File Name: bin/main.py
Class Name:
Method Name: main