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
after the call to pruner.compress(model) on line 89.
However, it is better to leave the saved checkpoint in its original state, with the masks attached, to make it easier to recover the pruning trajectories. You can check the number of ops/params with get_inf_params(model) if you want an indication of compression rate. Whenever you want to use a pruned model for something, you then just need to run the code from lines 71 to 89 in train.py, followed by the task you want the pruned model to complete.
When you call
python train.py --deploy --eval <-other-commands->
the network is pruned at runtime (by theif
statement on line 73) and then used.If you would like to save the pruned model, you could put a:
after the call to
pruner.compress(model)
on line 89.However, it is better to leave the saved checkpoint in its original state, with the masks attached, to make it easier to recover the pruning trajectories. You can check the number of ops/params with
get_inf_params(model)
if you want an indication of compression rate. Whenever you want to use a pruned model for something, you then just need to run the code from lines 71 to 89 intrain.py
, followed by the task you want the pruned model to complete.Hope this helps.
Originally posted by @jack-willturner in #1 (comment)
The text was updated successfully, but these errors were encountered: