e5a208bac69d34469652430fe42c220ed47c5a72,src/sdk/pynni/nni/compression/torch/speedup/infer_shape.py,,view_inshape,#Any#Any#Any#,533

Before Change


    step_size = shape["in_shape"][2] * shape["in_shape"][3]
    for loc in mask.mask_index[1]:
        index.extend([loc * step_size + i for i in range(step_size)])
    output_cmask.add_index_mask(dim=1, index=torch.tensor(index))  // pylint: disable=not-callable
    module_masks.set_output_mask(output_cmask)
    return output_cmask

After Change


    step_size = shape["in_shape"][2] * shape["in_shape"][3]
    for loc in mask.mask_index[1]:
        index.extend([loc * step_size + i for i in range(step_size)])
    output_cmask.add_index_mask(dim=1, index=torch.tensor(index).to(mask.mask_index[1].device))  // pylint: disable=not-callable
    module_masks.set_output_mask(output_cmask)
    return output_cmask
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: microsoft/nni
Commit Name: e5a208bac69d34469652430fe42c220ed47c5a72
Time: 2020-10-12
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/torch/speedup/infer_shape.py
Class Name:
Method Name: view_inshape


Project Name: ray-project/ray
Commit Name: e72838c03d87c8eb10f7cb8df8804496b14121ab
Time: 2020-09-09
Author: 33183774+juliusfrost@users.noreply.github.com
File Name: rllib/agents/marwil/marwil_torch_policy.py
Class Name:
Method Name: setup_mixins


Project Name: microsoft/nni
Commit Name: e5a208bac69d34469652430fe42c220ed47c5a72
Time: 2020-10-12
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/torch/speedup/infer_shape.py
Class Name:
Method Name: view_outshape