load_labels_like_latents

behavenet.data.utils.load_labels_like_latents(hparams, sess_ids, sess_idx, data_key='labels')[source]

Load labels from hdf5 in the same dictionary format that latents are saved.

Parameters:
  • hparams (dict) – needs to contain data generator params

  • sess_ids (list of dict) – each entry is a session dict with keys ‘lab’, ‘expt’, ‘animal’, ‘session’

  • sess_idx (int) – session index into data generator

  • data_key (str, optional) – key to index hdf5 file (name of hdf5 group)

Returns:

  • latents (list of np.ndarray)

  • trials (dict) with keys train, test, and val

Return type:

dict