def h_dist(module, init_module, p=2, q=2):
    """
    Calculate l_pq distance of parameters of trained network from random init
    Includes extra factor depending on number of hidden units
    """
    return (n_hidden(module, init_module) ** (1 - 1 / q)) * dist(
        module, init_module, p=p, q=q
    )

    Calculate l_pq distance of parameters of trained network from random init
    Includes extra factor depending on number of hidden units
    
grok/metrics.py