export_predictions¶
- behavenet.fitting.eval.export_predictions(data_generator, model, filename=None)[source]¶
Export decoder predictions using an already initialized data_generator and model.
Predictions 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]_predictions.pkl.
This function only supports pytorch decoding models - not autoencoders. To get AE reconstructions see the get_reconstruction function in this module.
- Parameters:
data_generator (
ConcatSessionGeneratorobject) – data generator to use for latent creationmodel (
NNobject) – pytorch modelfilename (
strorNoneType, optional) – absolute path to save latents; ifNoneType, latents are stored in model directory
- Returns:
list of prediction filenames
- Return type:
list