code: def h5_deconv_data(filename):
      """
      Read deconv visualization data from hdf5 file.
  
      Arguments:
          filename (str): Filename with hdf5 deconv data
  
      Returns:
          list of lists. Each inner list represents one layer, and consists of
          tuples (fm, deconv_data)
      """
      ret = list()
      with h5py.File(filename, "r") as f:
          if "deconv" not in list(f.keys()):
              return None
          act_data = f["deconv/max_act"]
          img_data = f["deconv/img"]
  
          for layer in list(act_data.keys()):
              layer_data = list()
              for fm in range(act_data[layer]["vis"].shape[0]):
                  # to avoid storing entire dataset, imgs are cached as needed, have to look up
                  batch_ind, img_ind = act_data[layer]["batch_img"][fm]
                  img_store = img_data["batch_{}".format(batch_ind)]
                  img_cache_ofs = img_store.attrs[str(img_ind)]
  
                  # have to convert from rgb to rgba and cast as uint32 dtype for bokeh
                  plot_img = convert_rgb_to_bokehrgba(
                      img_store["HWC_uint8"][:, :, :, img_cache_ofs]
                  )
                  plot_deconv = convert_rgb_to_bokehrgba(
                      act_data[layer]["vis"][fm]
                  )
  
                  layer_data.append((fm, plot_deconv, plot_img))
  
              ret.append((layer, layer_data))
      return ret
  
file_path: neon/neon/visualizations/data.py
imports: from __future__ import division
  from builtins import str
  import h5py
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: h5_deconv_data(filename) and returns: ret, None