Hello,
Thanks for the elaborate answer and for taking the time to look into the code. The lines that I had to changes were indeed:
# In msd_block.py lines 179-180, in the forward pass method
bias, *weights = self.parameters()

# CHANGED TO:
bias = self.bias
weights = (self.__dict__['weight{}'.format(i)] for i in range(len(self.weights)))

So is it true that when we change the names of the parameters to weights_orig the “pointers” stored in parameters() point to the originals, regardless of the name change? The changed line of code seems to work as pruning is now applied but it does not look very nice. Is this the way it should be done in your opinion?
Kind regards,
Richard
PS: I found the following curious change. The following line runs fine for PyTorch 1.1.0:
# This runs fine when I run the network (unpruned) in 1.1.0
weights = (self.__getattr__("weight{}".format(i)) for i in range(len(self.weights)))

# But throws the following Error for the pruned network in 1.4.0
AttributeError: 'MSDBlock2d' object has no attribute 'weight0'

It is probably something minor but I found it curious and therefore changed it to the above. When you print the __dir__() of the object you do see the attributes weight, weight_mask, weight_orig etc.