plot_figures.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:IDNNs 作者: ravidziv 项目源码 文件源码
def plot_hist(str_name, save_name='dist'):
    data_array = utils.get_data(str_name)
    params = np.squeeze(np.array(data_array['information']))
    ind_array = data_array['params']['epochsInds']
    DKL_YgX_YgT = utils.extract_array(params, 'DKL_YgX_YgT')
    p_ts = utils.extract_array(params, 'pts')
    H_Xgt = utils.extract_array(params, 'H_Xgt')

    f, (axes) = plt.subplots(3, 1)
    #axes = [axes]
    f.subplots_adjust(left=0.14, bottom=0.1, right=.928, top=0.94, wspace=0.13, hspace=0.55)
    colors = LAYERS_COLORS
    line_ani = animation.FuncAnimation(f, update_bars_num_of_ts, len(p_ts), repeat=False,
                                       interval=1, blit=False, fargs=[p_ts,H_Xgt,DKL_YgX_YgT, axes,ind_array])
    Writer = animation.writers['ffmpeg']
    writer = Writer(fps=50)
    #Save the movie
    line_ani.save(save_name+'_movie.mp4',writer=writer,dpi=250)
    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号