(filename, epoch_axis=True)
return ret
Read histogram data from hdf5 file. Generate x axis data for each hist line.

    Arguments:
        filename (str): Filename with hdf5 cost data
        epoch_axis (bool): whether to render epoch or minibatch as the integer step in the x axis

    Returns:
        list of tuples of (name, data, dh, dw, bins, offset)
Read histogram data from hdf5 file. Generate x axis data for each hist line.
Read histogram data from hdf5 file . Generate x axis data for each hist line .
def h5_hist_data(filename, epoch_axis=True):
    """
    Read histogram data from hdf5 file. Generate x axis data for each hist line.

    Arguments:
        filename (str): Filename with hdf5 cost data
        epoch_axis (bool): whether to render epoch or minibatch as the integer step in the x axis

    Returns:
        list of tuples of (name, data, dh, dw, bins, offset)
    """
    ret = list()
    with h5py.File(filename, "r") as f:
        if 'hist' in f:
            hists, config = [f[x] for x in ['hist', 'config']]
            bins, offset, time_markers = [hists.attrs[x]
                                          for x in ['bins', 'offset', 'time_markers']]
            total_epochs = config.attrs['total_epochs']
            total_minibatches = config.attrs['total_minibatches']

            for hname, hdata in hists.items():
                dw = total_epochs if (time_markers == 'epoch_freq') else total_minibatches
                dh = bins
                ret.append((hname, hdata[...], dh, dw, bins, offset))

    return ret
def h5_hist_data ( filename , epoch_axis = True ) : ret = list ( ) with h5py . File ( filename , "r" ) as f : if 'hist' in f : hists , config = [ f [ x ] for x in [ 'hist' , 'config' ] ] bins , offset , time_markers = [ hists . attrs [ x ] for x in [ 'bins' , 'offset' , 'time_markers' ] ] total_epochs = config . attrs [ 'total_epochs' ] total_minibatches = config . attrs [ 'total_minibatches' ] for hname , hdata in hists . items ( ) : dw = total_epochs if ( time_markers == 'epoch_freq' ) else total_minibatches dh = bins ret . append ( ( hname , hdata [ ... ] , dh , dw , bins , offset ) ) return ret