Undo pruning - How to 'unmask' pruned weights

Hey!,

I’m using PyTorch pruning. After pruning a model (a specific module in it, or globally), how can I undo the pruning? or at least ‘unmasking’ all the weights?

I was trying to modify the mask itself to contain only ones using custom_from_mask, but it seems to only work for pruning more weights, not ‘unmasking’ already pruned ones.

Thanks!

2 Likes

Any update on this question.

I’ve tried to delete the forward pre hook created during pruning, but it is insufficient. The weight mask still exists.