06c9cefed73cfd43f9453c616e1b9d3ef63f58cf,fairseq/models/speech_to_text/s2t_transformer.py,S2TTransformerEncoder,forward,#S2TTransformerEncoder#Any#Any#,297

Before Change



        return {
            "encoder_out": [x],  // T x B x C
            "encoder_padding_mask": [encoder_padding_mask] if encoder_padding_mask.any() else [],  // B x T
            "encoder_embedding": [],  // B x T x C
            "encoder_states": [],  // List[T x B x C]
            "src_tokens": [],

After Change



    def forward(self, src_tokens, src_lengths):
        if self.num_updates < self.encoder_freezing_updates:
            with torch.no_grad():
                x = self._forward(src_tokens, src_lengths)
        else:
            x = self._forward(src_tokens, src_lengths)
        return x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pytorch/fairseq
Commit Name: 06c9cefed73cfd43f9453c616e1b9d3ef63f58cf
Time: 2021-03-25
Author: changhan@fb.com
File Name: fairseq/models/speech_to_text/s2t_transformer.py
Class Name: S2TTransformerEncoder
Method Name: forward


Project Name: matplotlib/matplotlib
Commit Name: b218e7c6d97283ccbc6185dbe287302fc280191a
Time: 2019-05-21
Author: efiring@hawaii.edu
File Name: lib/matplotlib/scale.py
Class Name: SymmetricalLogTransform
Method Name: transform_non_affine


Project Name: matplotlib/matplotlib
Commit Name: b218e7c6d97283ccbc6185dbe287302fc280191a
Time: 2019-05-21
Author: efiring@hawaii.edu
File Name: lib/matplotlib/scale.py
Class Name: InvertedSymmetricalLogTransform
Method Name: transform_non_affine