Shortcuts

torch.nn.utils.parametrize.is_parametrized

torch.nn.utils.parametrize.is_parametrized(module, tensor_name=None)[source][source]

Determine if a module has a parametrization.

Parameters
  • module (nn.Module) – module to query

  • tensor_name (str, optional) – name of the parameter in the module Default: None

Returns

True if module has a parametrization for the parameter named tensor_name, or if it has any parametrization when tensor_name is None; otherwise False

Return type

bool

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources