# ParametrizationList¶

class torch.nn.utils.parametrize.ParametrizationList(modules, original)[source]

A sequential container that holds and manages the original parameter or buffer of a parametrized torch.nn.Module. It is the type of module.parametrizations[tensor_name] when module[tensor_name] has been parametrized with register_parametrization().

Note

This class is used internally by register_parametrization(). It is documented here for completeness. It should not be instantiated by the user.

Parameters
• modules (iterable) – an iterable of modules representing the parametrizations

• original (Parameter or Tensor) – parameter or buffer that is parametrized

set_original_(value)[source]

This method is called when assigning to a parametrized tensor.

It calls the methods right_inverse (see register_parametrization()) of the parametrizations in the inverse order that they have been registered. Then, it assigns the result to self.original.

Parameters

value (Tensor) – Value to which initialize the module

Raises

RuntimeError – if any of the parametrizations do not implement a right_inverse method