8f54218a8ed67dc6c3df585ff89777b1e2bb2c26,pytext/optimizer/sparsifiers/tests/sparsifier_test.py,TestSparsifier,test_param_mask_with_pre_mask,#TestSparsifier#,87

Before Change


        block_sz = 3
        blockwise_sparsifier = self._get_blockwise_sparsifier(block_sz, sparsity)
        param = torch.tensor([i for i in range(100)], dtype=float).view(10, 10)
        pre_mask = torch.tensor([i % 2 for i in range(100)], dtype=float).view(10, 10)
        block_l1_norms = param.new_zeros(param.shape)
        // loop-based implementation to compute blockwise l1norm
        abs_vals = []
        for i in range(10):

After Change


        param = torch.tensor([i for i in range(100)], dtype=float).view(10, 10)
        param = param - param.new_ones(param.shape) * 50
        pre_mask = param.new_zeros(param.shape)
        pre_mask[5:, :] = torch.ones(pre_mask[5:, :].shape)
        block_l1_norms = param.new_zeros(param.shape)
        // loop-based implementation to compute blockwise l1norm
        abs_vals = []
        for i in range(10):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: facebookresearch/pytext
Commit Name: 8f54218a8ed67dc6c3df585ff89777b1e2bb2c26
Time: 2019-12-06
Author: hyzhan@fb.com
File Name: pytext/optimizer/sparsifiers/tests/sparsifier_test.py
Class Name: TestSparsifier
Method Name: test_param_mask_with_pre_mask


Project Name: EpistasisLab/scikit-rebate
Commit Name: ece383696800b9b34854df27a65a3d1d74669952
Time: 2020-05-28
Author: alexmxu@alexs-mbp-3.attlocal.net
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit


Project Name: EpistasisLab/scikit-rebate
Commit Name: 163eb7df13667e21b0e02a2706e18d1f53eee610
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit