torch.nn.utils.prune.identity
- torch.nn.utils.prune.identity(module, name)
Apply pruning reparameterization without pruning any units.
Applies pruning reparameterization to the tensor corresponding to the parameter called
nameinmodulewithout actually pruning any units. Modifies module in place (and also return the modified module) by:adding a named buffer called
corresponding to the binary mask applied to the parameter by the pruning method.