(layer_name, layer_data, fm_max=8, plot_size=120)
return vis_keys, img_keys, fig_dict
Helper function to generate deconv visualization figures

    Arguments:
        layer_name (str): Layer name
        layer_data (list): Layer data to plot
        fm_max (int): Max layers to process
        plot_size (int, optional): Plot size

    Returns:
        tuple if vis_keys, img_keys, fig_dict
Helper function to generate deconv visualization figures
Helper function to generate deconv visualization figures
def deconv_figs(layer_name, layer_data, fm_max=8, plot_size=120):
    """
    Helper function to generate deconv visualization figures

    Arguments:
        layer_name (str): Layer name
        layer_data (list): Layer data to plot
        fm_max (int): Max layers to process
        plot_size (int, optional): Plot size

    Returns:
        tuple if vis_keys, img_keys, fig_dict
    """
    vis_keys = dict()
    img_keys = dict()
    fig_dict = dict()

    for fm_num, (fm_name, deconv_data, img_data) in enumerate(layer_data):

        if fm_num >= fm_max:
            break

        img_h, img_w = img_data.shape
        x_range = Range1d(start=0, end=img_w)
        y_range = Range1d(start=0, end=img_h)
        img_fig = image_fig(img_data, img_h, img_w, x_range, y_range, plot_size)
        deconv_fig = image_fig(deconv_data, img_h, img_w, x_range, y_range, plot_size)

        title = "{}_fmap_{:04d}".format(layer_name, fm_num)
        vis_keys[fm_num] = "vis_" + title
        img_keys[fm_num] = "img_" + title

        fig_dict[vis_keys[fm_num]] = deconv_fig
        fig_dict[img_keys[fm_num]] = img_fig

    return vis_keys, img_keys, fig_dict
def deconv_figs ( layer_name , layer_data , fm_max = 8 , plot_size = 120 ) : vis_keys = dict ( ) img_keys = dict ( ) fig_dict = dict ( ) for fm_num , ( fm_name , deconv_data , img_data ) in enumerate ( layer_data ) : if fm_num >= fm_max : break img_h , img_w = img_data . shape x_range = Range1d ( start = 0 , end = img_w ) y_range = Range1d ( start = 0 , end = img_h ) img_fig = image_fig ( img_data , img_h , img_w , x_range , y_range , plot_size ) deconv_fig = image_fig ( deconv_data , img_h , img_w , x_range , y_range , plot_size ) title = "{}_fmap_{:04d}" . format ( layer_name , fm_num ) vis_keys [ fm_num ] = "vis_" + title img_keys [ fm_num ] = "img_" + title fig_dict [ vis_keys [ fm_num ] ] = deconv_fig fig_dict [ img_keys [ fm_num ] ] = img_fig return vis_keys , img_keys , fig_dict