TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

tensorplay.ao.pruning.remove

tensorplay.ao.pruning.remove(module: Module, name: str) → Module[source]

Make the pruning of module[name] permanent and drop the reparameterization.

The pruned parameter name remains permanently pruned, the parameter name + '_orig' is removed from the parameter list, and the buffer name + '_mask' is removed from the buffers. The pruning hook is also detached from the module.

Note

Pruning itself is NOT undone or reversed!

Parameters:
  • module – module containing the pruned tensor.

  • name – parameter name within module whose pruning is removed.

Returns:

The modified module.

Raises:

ValueError – if name is not currently pruned on module.

On this page

Ask DeepWiki