def fc_params(in_features: int, out_features: int, bias: bool = True):
    """
    Return the number of parameters in a linear layer.
    Args:
        in_features: Size of input vector.
        out_features: Size of output vector.
        bias: If true count bias too.
    Returns:
        The number of parameters.
    """
    m = out_features + 1 if bias else out_features
    return in_features * m