10d7ece1c34c5533262a54d20d974a3d04f0b7ce,src/sdk/pynni/nni/compression/tensorflow/compressor.py,Compressor,__init__,#Compressor#Any#Any#Any#,79

Before Change


    def __init__(self, LayerWrapperClass, model, config_list):
        assert isinstance(model, tf.keras.Model)
        if isinstance(model, tf.keras.Sequential):
            raise ValueError("NNI model compression does not support `Sequential` model for now")
        self.validate_config(model, config_list)

        self.bound_model = model
        self.wrappers = []

After Change


        self._wrappers = {}  // key: id(layer) , value: Wrapper(layer)

        self.compressed_model = self._instrument(model)
        self.wrappers = list(self._wrappers.values())

        if not self.wrappers:
            _logger.warning("Nothing is configured to compress, please check your model and config list")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Microsoft/nni
Commit Name: 10d7ece1c34c5533262a54d20d974a3d04f0b7ce
Time: 2020-09-15
Author: 40699903+liuzhe-lz@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/tensorflow/compressor.py
Class Name: Compressor
Method Name: __init__


Project Name: dnouri/skorch
Commit Name: 53ef00376510ee9ba4506918db06b25dad4a7ea4
Time: 2017-07-31
Author: benjamin.bossan@ottogroup.com
File Name: inferno/callbacks.py
Class Name: BestLoss
Method Name: initialize


Project Name: ericmjl/pyjanitor
Commit Name: d1370fadc97636d0814dce5df98862464ac6db9a
Time: 2019-05-07
Author: david.frazzetto@gmail.com
File Name: janitor/io.py
Class Name:
Method Name: read_csvs