RandomUnstructured
class torch.nn.utils.prune.RandomUnstructured(amount)
Prune (currently unpruned) units in a tensor at random.
Parameters:
      * name (str) -- parameter name within "module" on which
        pruning will act.
  * **amount** (*int** or **float*) -- quantity of parameters to
    prune. If "float", should be between 0.0 and 1.0 and represent
    the fraction of parameters to prune. If "int", it represents
    the absolute number of parameters to prune.

classmethod apply(module, name, amount)
  Adds the forward pre-hook that enables pruning on the fly and
  the reparametrization of a tensor in terms of the original
  tensor and the pruning mask.

  Parameters:
     * **module** (*nn.Module*) -- module containing the tensor to
       prune

     * **name** (*str*) -- parameter name within "module" on which
       pruning will act.

     * **amount** (*int** or **float*) -- quantity of parameters
