-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Model Compression] add scheduler high level api #4236
Conversation
cc3e112
to
76890fe
Compare
@@ -54,9 +54,11 @@ def __init__(self, model: Module, config_list: List[Dict]): | |||
config_list | |||
The config list used by compressor, usually specifies the 'op_types' or 'op_names' that want to compress. | |||
""" | |||
assert isinstance(model, Module) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what case, the model will be None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we use the scheduler, in fact, we don't need to pass model and config_list to pruner when initializing. Model and config_list will pass to pruner by pruner.reset(model, config_list)
during each iteration.
The best result (and intermediate result if keeped) during iteration is under `log_dir` (default: \\.).') | ||
|
||
|
||
class LinearPruner(IterativePruner): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any example for these iterative pruners?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update an AGPPruner
example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
waiting for #4125 merge