You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've noticed that during iterative pruning, the model might not necessarily undergo pruning after each step (pruning generator does not return anything - is empty). Since the iterative pruning process involves a cycle of pruning and training, it would be beneficial to verify whether the model has been pruned after each step, rather than proceeding directly to training.
Here's a scenario where this improvement could be useful: currently, after calling the step() function of the pruning algorithm, we proceed to training the model without confirming if pruning has actually occurred. This can lead to unnecessary training cycles on an unpruned model.
To address this, we can modify the step() method within the MetaPruner class. By introducing a return value to indicate whether pruning has taken place, we can optimize the training process. Below is a simple suggested implementation:
defstep(self, interactive=False) ->typing.Union[typing.Generator, None]:
self.current_step+=1pruning_method=self.prune_globalifself.global_pruningelseself.prune_localifinteractive:
returnpruning_method() # yield groups for interactive pruningelse:
pruned=Falseforgroupinpruning_method():
group.prune()
pruned=Truereturnpruned
With this enhancement, before initiating training, we can easily check if pruning has occurred after calling step(). This allows us to seamlessly continue our iterative loop without unnecessary training cycles on an unpruned model.
The text was updated successfully, but these errors were encountered:
Hello, I've noticed that during iterative pruning, the model might not necessarily undergo pruning after each step (pruning generator does not return anything - is empty). Since the iterative pruning process involves a cycle of pruning and training, it would be beneficial to verify whether the model has been pruned after each step, rather than proceeding directly to training.
Here's a scenario where this improvement could be useful: currently, after calling the
step()
function of the pruning algorithm, we proceed to training the model without confirming if pruning has actually occurred. This can lead to unnecessary training cycles on an unpruned model.To address this, we can modify the
step()
method within the MetaPruner class. By introducing a return value to indicate whether pruning has taken place, we can optimize the training process. Below is a simple suggested implementation:With this enhancement, before initiating training, we can easily check if pruning has occurred after calling
step()
. This allows us to seamlessly continue our iterative loop without unnecessary training cycles on an unpruned model.The text was updated successfully, but these errors were encountered: