Rate this Page

torch.nn.utils.parametrize.is_parametrized#

torch.nn.utils.parametrize.is_parametrized(module,tensor_name=None)[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 moduleDefault:None

Returns

True ifmodule has a parametrization for the parameter namedtensor_name,or if it has any parametrization whentensor_name isNone;otherwiseFalse

Return type

bool