def initialize_parameters(layer_dims):
    '\n    Initialize parameters for different levels of the network\n\n    Arguments:\n    layer_dims -- python array (list) containing the dimensions of each layer in the network\n\n    Returns:\n    parameters -- python dictionary containing your parameters "W1", "b1", ..., "WL", "bL", ...:\n                    Wl -- weight matrix of shape (layer_dims[l], layer_dims[l-1])\n                    bl -- bias vector of shape (layer_dims[l], 1)\n    '
    np.random.seed(1)
    parameters = {}
    L = len(layer_dims)
    for l in range(1, L):
        parameters[('W' + str(l))] = (np.random.randn(layer_dims[l], layer_dims[(l - 1)]) * 0.01)
        parameters[('b' + str(l))] = np.zeros((layer_dims[l], 1))
        assert (parameters[('W' + str(l))].shape == (layer_dims[l], layer_dims[(l - 1)]))
        assert (parameters[('b' + str(l))].shape == (layer_dims[l], 1))
    return parameters
Initialize parameters for different levels of the network

Arguments:
layer_dims -- python array (list) containing the dimensions of each layer in the network

Returns:
parameters -- python dictionary containing your parameters "W1", "b1", ..., "WL", "bL", ...:
                Wl -- weight matrix of shape (layer_dims[l], layer_dims[l-1])
                bl -- bias vector of shape (layer_dims[l], 1)
def initialize_parameters(layer_dims):
    '\n    Initialize parameters for different levels of the network\n\n    Arguments:\n    layer_dims -- python array (list) containing the dimensions of each layer in the network\n\n    Returns:\n    parameters -- python dictionary containing your parameters "W1", "b1", ..., "WL", "bL", ...:\n                    Wl -- weight matrix of shape (layer_dims[l], layer_dims[l-1])\n                    bl -- bias vector of shape (layer_dims[l], 1)\n    '
    np.random.seed(1)
    parameters = {}
    L = len(layer_dims)
    for l in range(1, L):
        parameters[('W' + str(l))] = (np.random.randn(layer_dims[l], layer_dims[(l - 1)]) * 0.01)
        parameters[('b' + str(l))] = np.zeros((layer_dims[l], 1))
        assert (parameters[('W' + str(l))].shape == (layer_dims[l], layer_dims[(l - 1)]))
        assert (parameters[('b' + str(l))].shape == (layer_dims[l], 1))
    return parameters