def update_params(params, grads, learning_rate):
    """
    update parameters using gradient descent
    :param params: dict, containing user parameters of NN
    :param grads: dict, cotaining gradients from nn_backward()
    :param learning_rate: float, learning rate of model
    :return:
        params, dict, containing updated parameters
    """
    num_layer = len(params) // 2
    for n in range(num_layer):
        params["W" + str(n + 1)] = params["W" + str(n + 1)] - learning_rate * grads["dW" + str(n + 1)]
        params["b" + str(n + 1)] = params["b" + str(n + 1)] - learning_rate * grads["db" + str(n + 1)]
    return params