981e912036e667a0d0e100a12001e3e8543620ea,pytorch/pytorchcv/models/sknet.py,SKConvBlock,forward,#SKConvBlock#Any#,70

Before Change


        w = self.softmax(w)

        w = list(w.chunk(self.num_branches, dim=1))
        w = list(map(lambda y: y.reshape(batch, self.out_channels, 1, 1), w))
        v = list(map(lambda y1, y2: y1 * y2, outs, w))
        v = reduce(lambda y1, y2: y1 + y2, v)
        return v

After Change


    def forward(self, x):
        y = self.branches(x)

        u = y.sum(dim=1)
        s = self.pool(u)
        z = self.fc1(s)
        w = self.fc2(z)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: osmr/imgclsmob
Commit Name: 981e912036e667a0d0e100a12001e3e8543620ea
Time: 2019-04-07
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/sknet.py
Class Name: SKConvBlock
Method Name: forward


Project Name: dask/distributed
Commit Name: aacdd78fd2f48481ec1c24b281f399ebb0f215f8
Time: 2021-03-17
Author: jakirkham@gmail.com
File Name: distributed/comm/tcp.py
Class Name: TCP
Method Name: write


Project Name: keras-team/keras-preprocessing
Commit Name: 6f679b06d10d39edcb066142eec9e3bcd6d9de4b
Time: 2019-02-25
Author: rragundez@users.noreply.github.com
File Name: keras_preprocessing/image/dataframe_iterator.py
Class Name: DataFrameIterator
Method Name: _filter_valid_filepaths


Project Name: pytorch/examples
Commit Name: 9faf2c65f74e3ee9bdaeedf9f3e5856727f0afe7
Time: 2017-12-04
Author: design@kaixhin.com
File Name: reinforcement_learning/actor_critic.py
Class Name:
Method Name: finish_episode


Project Name: brian-team/brian2
Commit Name: 9a44bfee4725073937dc2c96f1c89ca30bd641c8
Time: 2012-10-24
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: UnitRegistry
Method Name: __getitem__