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_module
toto_module
.If
tensor_name
is 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.