def params_count(params):
    """
        count the number of the parameters.
    """
    def get_from_tuples(some_tuples):
        num = 1
        for t in some_tuples:
            num *= t
        return num
    nums = 0
    for v in params.values():
        nums += get_from_tuples(v.shape)
    return nums