2baaefbede4d08ab8f9080430d9a98f84a2d01e3,bindsnet/network/topology.py,MaxPool2dConnection,compute,#MaxPool2dConnection#Any#,400

Before Change



        B, C, H, W = indices.shape
        output = torch.zeros_like(indices)
        for b in range(B):
            for c in range(C):
                        output[b][c] = s[b][c].take(indices[b][c])

        return output.float()

    def update(self, **kwargs) -> None:
        // language=rst

After Change


            return_indices=True,
        )

        return s.flatten(2).gather(2, indices.flatten(2)).view_as(indices).float()

    def update(self, **kwargs) -> None:
        // language=rst
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: BindsNET/bindsnet
Commit Name: 2baaefbede4d08ab8f9080430d9a98f84a2d01e3
Time: 2020-03-04
Author: 280943872@qq.com
File Name: bindsnet/network/topology.py
Class Name: MaxPool2dConnection
Method Name: compute


Project Name: BindsNET/bindsnet
Commit Name: 2baaefbede4d08ab8f9080430d9a98f84a2d01e3
Time: 2020-03-04
Author: 280943872@qq.com
File Name: bindsnet/network/topology.py
Class Name: MaxPool2dConnection
Method Name: compute


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/cholesky.py
Class Name:
Method Name: batch_potrs


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/cholesky.py
Class Name:
Method Name: batch_potrf