redback.transient_models.learned_models

This file holds the functions to call the LearnedSurrogateModel models.

LearnedSurrogateModel are models from the redback_surrogates package that have been trained to emulate more complex transient models and saved in ONNX format.

The workflow for these models is to load the model from an ONNX file using the LearnedSurrogateModel.from_onnx_file() method, then use the make_learned_model_callable() function to create a callable function that can be used to evaluate the model given time and parameters.

Functions

make_learned_model_callable(model)

This function takes in a LearnedSurrogateModel instance and returns a callable function that can be used to evaluate the model given time and parameters.