make_session_swap_movie

behavenet.plotting.cond_ae_utils.make_session_swap_movie(sess_ids, hparams, version, n_labels, n_background, sess_idx, trials, trial_idxs=None, n_buffer_frames=5, frame_rate=15, layout_pattern=None, save_file=None, **kwargs)[source]

Create a multipanel movie, each panel showing reconstruction with different session context.

TODO

Parameters:
  • sess_ids (list of dicts) –

  • hparams

  • version

  • n_labels (int) – dimensionality of supervised latent space (ignored when using fully unsupervised models)

  • n_background (int) –

  • sess_idx (int) – session index into data generator

  • trials (array-like of int) – trials of base frame used for interpolation; if an entry is an integer, the corresponding entry in trial_idxs must be None. This value is a trial index into all possible trials (train, val, test), whereas trial_idxs is an index only into test trials

  • trial_idxs (list, optional) – list of test trials to construct videos from; if NoneType, use first test trial

  • n_buffer_frames (int, optional) – number of blank frames to insert between base frames

  • frame_rate

  • layout_pattern (np.ndarray) – boolean array that determines where reconstructed frames are placed in a grid

  • save_file (str, optional) – absolute path of save file; does not need file extension, will automatically be saved as mp4. To save as a gif, include the ‘.gif’ file extension in save_file

  • kwargs – arguments are keys of hparams, for example to set train_frac, rng_seed_model, etc.