pytorch / 1 / generated / torch.nn.utils.parametrize.is_parametrized.html

torch.nn.utils.parametrize.is_parametrized

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

Returns True if module has an active parametrization.

If the argument tensor_name is specified, returns True if module[tensor_name] is parametrized.

Parameters:
  • module (nn.Module) – module to query
  • name (str, optional) – attribute in the module to query Default: None
Return type:

bool

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.nn.utils.parametrize.is_parametrized.html