Skip to content
Snippets Groups Projects
Commit cb3049bd authored by Neta Zmora's avatar Neta Zmora
Browse files

Bug fix: Thinning API was not updated after changing the scheduler callback signature

We recently changed the signature of the on_minibatch_begin() callback
from the scheduler (added 'meta') and the callback client
in the thinning module was not updated.
parent 11402988
No related branches found
No related tags found
No related merge requests found
......@@ -386,7 +386,7 @@ class FilterRemover(ScheduledTrainingPolicy):
self.thinning_func(model, zeros_mask_dict, self.arch, self.dataset, optimizer=optimizer)
self.done = True
def on_minibatch_begin(self, model, epoch, minibatch_id, minibatches_per_epoch, zeros_mask_dict, optimizer):
def on_minibatch_begin(self, model, epoch, minibatch_id, minibatches_per_epoch, zeros_mask_dict, meta, optimizer):
# We hook onto the on_minibatch_begin because we want to run after the pruner which sparsified
# the tensors. Pruners configure their pruning mask in on_epoch_begin, but apply the mask
# only in on_minibatch_begin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment