def compute_params(model):
    """Compute the total number of parameters.

    Args:
      model (nn.Module): PyTorch model.

    Returns:
      Total number of parameters - both trainable and non-trainable (int).

    """
    return sum([p.numel() for p in model.parameters()])