assertself.bound_modelisnotNoneandself.config_listisnotNone,'Model and/or config_list are not set in this pruner, please set them by reset() before compress().'
@@ -1095,24 +1097,26 @@ class ADMMPruner(BasicPruner):
For detailed example please refer to :githublink:`examples/model_compress/pruning/admm_pruning_torch.py <examples/model_compress/pruning/admm_pruning_torch.py>`
@@ -293,9 +294,9 @@ class SimulatedAnnealingPruner(IterativePruner):
Parameters
----------
model : Module
model : Optional[Module]
The origin unwrapped pytorch model to be pruned.
config_list : List[Dict]
config_list : Optional[List[Dict]]
The origin config list provided by the user.
evaluator : Callable[[Module], float]
Evaluate the pruned model and give a score.
...
...
@@ -312,7 +313,7 @@ class SimulatedAnnealingPruner(IterativePruner):
This iterative pruner will use the chosen corresponding pruner to prune the model in each iteration.
pruning_params : Dict
If the chosen pruning_algorithm has extra parameters, put them as a dict to pass in.
log_dir : str
log_dir : Union[str, Path]
The log directory use to saving the result, you can find the best result under this folder.
keep_intermediate_result : bool
If keeping the intermediate result, including intermediate model and masks during each iteration.
...
...
@@ -337,9 +338,9 @@ class SimulatedAnnealingPruner(IterativePruner):
For detailed example please refer to :githublink:`examples/model_compress/pruning/simulated_anealing_pruning_torch.py <examples/model_compress/pruning/simulated_anealing_pruning_torch.py>`