torch.nn.utils.parametrize.transfer_parametrizations_and_params
-
torch.nn.utils.parametrize.transfer_parametrizations_and_params(from_module, to_module, tensor_name=None)[source] -
Transfer parametrizations and the parameters they parametrize from
from_moduletoto_module.If
tensor_nameis specified, only transfers the specified parameter, otherwise transfers all parametrized parameters. If those parameters do not exist in to_module, it will create them. Does nothing if from_module is not parametrized.