def update_params(params: dict, grads: dict, alpha: float) -> dict:
    """
    Updates the parameters using gradient descent.
    :param params: dict containing the initial weight matrix W and bias vector b
    :param grads: gradients
    :param alpha: learning rate
    :return: dict containing the updated weight matrix W and bias vector b
    """
    L = len(params) // 2  # number of layers

    for l in range(L):
        params["W" + str(l + 1)] -= alpha * grads["dW" + str(l + 1)]
        params["b" + str(l + 1)] -= alpha * grads["db" + str(l + 1)]

    return params