01e392070fed398b988b87e403c8f435611b93d9,pytext/models/bert_classification_models.py,BertPairwiseModel,forward,#BertPairwiseModel#Any#Any#,185

Before Change


        encodings = [self.encoder1(input_tuple1)[0], self.encoder2(input_tuple2)[0]]
        if self.encode_relations:
            encodings = self._encode_relations(encodings)
        encoding = torch.cat(encodings, -1)
        return self.decoder(encoding)

    def save_modules(self, base_path: str = "", suffix: str = ""):
        self._save_modules(self.encoders, base_path, suffix)

After Change


        encodings = [self.encoder1(input_tuple1)[0], self.encoder2(input_tuple2)[0]]
        if self.encode_relations:
            encodings = self._encode_relations(encodings)
        return self.decoder(torch.cat(encodings, -1)) if self.decoder else encodings

    def save_modules(self, base_path: str = "", suffix: str = ""):
        self._save_modules(self.encoders, base_path, suffix)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: facebookresearch/pytext
Commit Name: 01e392070fed398b988b87e403c8f435611b93d9
Time: 2019-09-17
Author: kushall@fb.com
File Name: pytext/models/bert_classification_models.py
Class Name: BertPairwiseModel
Method Name: forward


Project Name: pytorch/examples
Commit Name: 632d385444ae16afe3e4003c94864f9f97dc8541
Time: 2019-09-04
Author: hongyu@mail.com
File Name: word_language_model/model.py
Class Name: RNNModel
Method Name: forward


Project Name: XifengGuo/CapsNet-Keras
Commit Name: 37f599f61067cc6947c9bf783eace05227c0f450
Time: 2017-11-13
Author: guoxifeng1990@163.com
File Name: capsulenet.py
Class Name:
Method Name: CapsNet