class torchelie.nn.utils.remove_weight_lambda(module: torch.nn.modules.module.Module, hook_name: str, name: str = 'weight')

Remove the hook hook_name applied on member name of module.

  • module (nn.Module) – the module on which the hook has to be removed

  • hook_name (str) – an identifier for that WeightLambda hook, such as ‘l2normalize’, ‘weight_norm’, etc.

  • name (str) – the name of the module’s parameter the hook is applied on. Default: ‘weight’.