core.utils.torchutils.get_number_of_model_parameters
core.utils.torchutils.get_number_of_model_parameters(
model,
requires_grad_flags=(True, False),
)Counts parameters of the module. The list requires_grad_flag can be used to specify whether all parameters should be counted, or only those with requires_grad = True or False. :param model: nn.Module model :param requires_grad_flags: tuple tuple of bools, for requested requires_grad flags :return: number of parameters of the model with requested required_grad flags