torch.nn.utils.parametrize.is_parametrized¶ torch.nn.utils.parametrize.is_parametrized(module, tensor_name=None)[source][source]¶ 判断一个模块是否具有参数化。 参数: module (nn.Module) – 要查询的模块 tensor_name (str, 可选) – 模块中参数的名称 Default: None 返回值: 如果 module 对名为 tensor_name 的参数有参数化,或者当 tensor_name 为 None 时有任何参数化;否则 False 返回类型: 布尔型