deep_neural_network.py
def update_params(params, grads, learning_rate):
    """
    Update parameters using gradient descent
    
    Arguments:
    params : python dictionary containing your parameters 
    
    params : python dictionary containing your parameters 
             "W1", "b1", ..., "WL", "bL":
                  Wl : np.ndarray
                       weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                  bl : np.ndarray
                       bias vector of layer l 
                       (layer_dims[l] x 1)
    
    grads : python dictionary containing your gradients,
            "dW1", "db1", ..., "dWL", "dbL":
                  dWl : np.ndarray
                       gradient for weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                 dbl : np.ndarray
                       gradient for bias vector of layer l 
                       (layer_dims[l] x 1)      
            output of L_model_backward
    
    Returns:
    params :  python dictionary containing your updated parameters 
              same definition of params input
    """
    
    L = len(params) // 2 # number of layers in the neural network

    # Update rule for each parameter. Use a for loop.
    for l in range(L):
        params["W" + str(l+1)] = params["W" + str(l+1)] - grads["dW" + str(l+1)] * learning_rate
        params["b" + str(l+1)] = params["b" + str(l+1)] - grads["db" + str(l+1)] * learning_rate
    return params

    Update parameters using gradient descent
    
    Arguments:
    params : python dictionary containing your parameters 
    
    params : python dictionary containing your parameters 
             "W1", "b1", ..., "WL", "bL":
                  Wl : np.ndarray
                       weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                  bl : np.ndarray
                       bias vector of layer l 
                       (layer_dims[l] x 1)
    
    grads : python dictionary containing your gradients,
            "dW1", "db1", ..., "dWL", "dbL":
                  dWl : np.ndarray
                       gradient for weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                 dbl : np.ndarray
                       gradient for bias vector of layer l 
                       (layer_dims[l] x 1)      
            output of L_model_backward
    
    Returns:
    params :  python dictionary containing your updated parameters 
              same definition of params input
    
Update parameters using gradient descent
Arguments:
params : python dictionary containing your parameters





params :  python dictionary containing your updated parameters
same definition of params input
Update parameters using gradient descent Arguments : params : python dictionary containing your parameters params : python dictionary containing your updated parameters same definition of params input
def update_params(params, grads, learning_rate):
    L = len(params) // 2 
    for l in range(L):
        params["W" + str(l+1)] = params["W" + str(l+1)] - grads["dW" + str(l+1)] * learning_rate
        params["b" + str(l+1)] = params["b" + str(l+1)] - grads["db" + str(l+1)] * learning_rate
    return params
def update_params ( params , grads , learning_rate ) : L = len ( params ) // 2 for l in range ( L ) : params [ "W" + str ( l + 1 ) ] = params [ "W" + str ( l + 1 ) ] - grads [ "dW" + str ( l + 1 ) ] * learning_rate params [ "b" + str ( l + 1 ) ] = params [ "b" + str ( l + 1 ) ] - grads [ "db" + str ( l + 1 ) ] * learning_rate return params
Update parameters using gradient descent
Arguments:
params : python dictionary containing your parameters
Update parameters using gradient descent Arguments : params : python dictionary containing your parameters
"""
    Update parameters using gradient descent
    
    Arguments:
    params : python dictionary containing your parameters 
    
    params : python dictionary containing your parameters 
             "W1", "b1", ..., "WL", "bL":
                  Wl : np.ndarray
                       weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                  bl : np.ndarray
                       bias vector of layer l 
                       (layer_dims[l] x 1)
    
    grads : python dictionary containing your gradients,
            "dW1", "db1", ..., "dWL", "dbL":
                  dWl : np.ndarray
                       gradient for weight matrix of layer l 
                       (layer_dims[l] x layer_dims[l-1])
                 dbl : np.ndarray
                       gradient for bias vector of layer l 
                       (layer_dims[l] x 1)      
            output of L_model_backward
    
    Returns:
    params :  python dictionary containing your updated parameters 
              same definition of params input
    """ # number of layers in the neural network # Update rule for each parameter. Use a for loop.
params
grads
learning_rate