export_latents¶
- behavenet.fitting.eval.export_latents(data_generator, model, filename=None)[source]¶
Export predicted latents using an already initialized data_generator and model.
Latents are saved based on the model’s hparams dict unless another file is provided. The default filename is [lab_id]_[expt_id]_[animal_id]_[session_id]_latents.pkl.
- Parameters:
data_generator (
ConcatSessionGeneratorobject) – data generator to use for latent creationmodel (
AEobject) – pytorch modelfilename (
strorNoneType, optional) – absolute path to save latents; ifNoneType, latents are stored in model directory
- Returns:
list of latent filenames
- Return type:
list