b7045b1938cb58506a6f8dc8274c971f630d9105,src/sdk/pynni/nni/compression/torch/compressor.py,PrunerModuleWrapper,__init__,#PrunerModuleWrapper#Any#Any#Any#Any#Any#,204

Before Change


        // register user specified buffer
        for name in self.pruner.buffers:
            self.register_buffer(name, self.pruner.buffers[name].clone())
            self.registered_buffers[name] = getattr(self, name)

    def forward(self, *inputs):
        mask = self.pruner.calc_mask(LayerInfo(self.name, self.module), self.config, **self.registered_buffers)
        if mask is not None:

After Change


        // config and pruner
        self.config = config
        self.pruner = pruner
        self.registered_buffers = []

        // register buffer for mask
        self.register_buffer("weight_mask", torch.ones(self.module.weight.shape))
        if hasattr(self.module, "bias") and self.module.bias is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: microsoft/nni
Commit Name: b7045b1938cb58506a6f8dc8274c971f630d9105
Time: 2020-02-16
Author: 656569648@qq.com
File Name: src/sdk/pynni/nni/compression/torch/compressor.py
Class Name: PrunerModuleWrapper
Method Name: __init__


Project Name: asyml/texar
Commit Name: e217947a9e34adc009913fe9f1a8d94e9fbab80d
Time: 2017-07-23
Author: zhitinghu@gmail.com
File Name: txtgen/core/layers.py
Class Name:
Method Name: get_rnn_cell


Project Name: microsoft/nni
Commit Name: b7045b1938cb58506a6f8dc8274c971f630d9105
Time: 2020-02-16
Author: 656569648@qq.com
File Name: src/sdk/pynni/nni/compression/torch/compressor.py
Class Name: QuantizerModuleWrapper
Method Name: __init__