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._original_model = model
self._config_list = config_list
self._wrapper_class = LayerWrapperClass
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")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: ray-project/ray
Commit Name: 6373c706615bc94c0a1e7fc564b3d18c3d342d91
Time: 2020-04-30
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: create_backend
Project Name: catalyst-team/catalyst
Commit Name: c5c350cf9f9b576cc9de939e4dc308404eb48852
Time: 2019-05-28
Author: scitator@gmail.com
File Name: catalyst/dl/experiments/experiment.py
Class Name: ConfigExperiment
Method Name: get_optimizer_and_model