a968bc8ae127d1e3833c2fa468858f9c48f6923c,batchflow/models/torch/encoder_decoder.py,DecoderModule,forward,#DecoderModule#Any#,96

Before Change


        inputs = x if isinstance(x, list) else [x]
        x = inputs[-1]

        for i in range(self.num_stages):
            for letter in self.decoder_layout:
                if letter in ["b"]:
                    x = self.decoder_b[b_counter](x)
                    b_counter += 1
                elif letter in ["u"]:
                    x = self.decoder_u[u_counter](x)
                    u_counter += 1

After Change



        for letter, layer in zip(self.layout, self.values()):
            if letter in ["b", "u"]:
                x = layer(x)
            elif letter in ["c"] and self.skip and (i < len(inputs) - 2):
                x = layer([x, inputs[-i - 3]])
                i += 1
        return x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: analysiscenter/batchflow
Commit Name: a968bc8ae127d1e3833c2fa468858f9c48f6923c
Time: 2020-02-10
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/torch/encoder_decoder.py
Class Name: DecoderModule
Method Name: forward


Project Name: analysiscenter/batchflow
Commit Name: a968bc8ae127d1e3833c2fa468858f9c48f6923c
Time: 2020-02-10
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/torch/encoder_decoder.py
Class Name: EncoderModule
Method Name: forward


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 4fd8961026fdab7e17817083b96f59157bd0ca09
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/encoders/conv_encoder.py
Class Name: ConvEncoder
Method Name: _cnn_stack