Raises:
      TypeError -- if "PRUNING_TYPE != 'unstructured'"
Note:
 Since global structured pruning doesn't make much sense unless
 the norm is normalized by the size of the parameter, we now limit
 the scope of global pruning to unstructured methods.

-[ Examples ]-



from torch.nn.utils import prune
from collections import OrderedDict
net = nn.Sequential(OrderedDict([
   ...     ('first', nn.Linear(10, 4)),
   ...     ('second', nn.Linear(4, 1)),
   ... ]))
parameters_to_prune = (
   ...     (net.first, 'weight'),
   ...     (net.second, 'weight'),
   ... )
prune.global_unstructured(
   ...     parameters_to_prune,
   ...     pruning_method=prune.L1Unstructured,
   ...     amount=10,
   ... )
print(sum(torch.nn.utils.parameters_to_vector(net.buffers()) == 0))
   tensor(10)


