(old_params, new_params, ord='inf')
return change
Measure the change in parameters.

    Parameters
    ----------
    old_params : list
        The old parameters as a list of ndarrays, typically from
        session.run(var_list)
    new_params : list
        The old parameters as a list of ndarrays, typically from
        session.run(var_list)
    ord : {non-zero int, inf, -inf, ‘fro’, ‘nuc’}, optional
        Type of norm used to quantify the change. Passed to `numpy.linalg.norm`.

    Returns
    -------
    change : float
        The parameter change measured as a norm of the vector difference.
Measure the change in parameters.
Measure the change in parameters .
def get_parameter_change(old_params, new_params, ord='inf'):
    """Measure the change in parameters.

    Parameters
    ----------
    old_params : list
        The old parameters as a list of ndarrays, typically from
        session.run(var_list)
    new_params : list
        The old parameters as a list of ndarrays, typically from
        session.run(var_list)
    ord : {non-zero int, inf, -inf, ‘fro’, ‘nuc’}, optional
        Type of norm used to quantify the change. Passed to `numpy.linalg.norm`.

    Returns
    -------
    change : float
        The parameter change measured as a norm of the vector difference.

    """
    if ord=='inf':
        ord = np.inf
    elif ord=='-inf':
        ord = -np.inf

    old_params = np.concatenate([param.ravel() for param in old_params])
    new_params = np.concatenate([param.ravel() for param in new_params])
    change = np.linalg.norm(new_params - old_params, ord=ord)

    return change
def get_parameter_change ( old_params , new_params , ord = 'inf' ) : if ord == 'inf' : ord = np . inf elif ord == '-inf' : ord = - np . inf old_params = np . concatenate ( [ param . ravel ( ) for param in old_params ] ) new_params = np . concatenate ( [ param . ravel ( ) for param in new_params ] ) change = np . linalg . norm ( new_params - old_params , ord = ord ) return change