torch.nn.utils.prune.identity
torch.nn.utils.prune.identity(module, name)
Applies pruning reparametrization to the tensor corresponding to
   the parameter called "name" in "module" without actually pruning
   any units. Modifies module in place (and also return the modified
   module) by:


adding a named buffer called "name+'_mask'" corresponding to the
      binary mask applied to the parameter "name" by the pruning
      method.


replacing the parameter "name" by its pruned version, while the
      original (unpruned) parameter is stored in a new parameter named
      "name+'_orig'".


Note:
 The mask is a tensor of ones.

Parameters:
      * module (nn.Module) -- module containing the tensor to
        prune.
  * **name** (*str*) -- parameter name within "module" on which
    pruning will act.

Returns:
      modified (i.e. pruned) version of the input module
Return type:
      module (nn.Module)
-[ Examples ]-