make_neural_reconstruction_movie_wrapper¶
- behavenet.plotting.decoder_utils.make_neural_reconstruction_movie_wrapper(hparams, save_file, trials=None, sess_idx=0, max_frames=400, max_latents=8, zscore_by_dim=False, colored_predictions=False, xtick_locs=None, frame_rate=15)[source]¶
Produce movie with original video, ae reconstructed video, and neural reconstructed video.
This is a high-level function that loads the model described in the hparams dictionary and produces the necessary predicted video frames. Latent traces are additionally plotted, as well as the residual between the ae reconstruction and the neural reconstruction. Currently produces ae latents and decoder predictions from scratch (rather than saved pickle files).
- Parameters:
hparams (
dict) – needs to contain enough information to specify an autoencodersave_file (
str) – full save file (path and filename)trials (
intorlist, optional) – ifNoneType, use first test trialsess_idx (
int, optional) – session index into data generatormax_frames (
int, optional) – maximum number of frames to animate from a trialmax_latents (
int, optional) – maximum number of ae latents to plotzscore_by_dim (
bool, optional) – True to z-score each dim, False to leave relative scalescolored_predictions (
bool, optional) – False to plot reconstructions in black, True to plot in different colorsxtick_locs (
array-like, optional) – tick locations in units of binsframe_rate (
float, optional) – frame rate of saved movie