'Talos, syntax to select best_model

I'm running a toy model for learning, on Ubuntu 21.10, in a conda environment that comprises python 3.74, keras 2.4.3 and talos 1.0, among many other packages. I've run a talos scan using this code:

jam1 = talos.Scan(data,
                  labels[0,],
                  model = DLAt,
                  params = ParamsJam1,
                  experiment_name = "DL2Outputs"
                  )

However I've tried everything I can find but can not find correct syntax to select the best model using talos.best_model.

bm = talos.best_model(metric='loss', asc=False)

just gets this error.

AttributeError: module 'talos' has no attribute 'best_model'

Is this not the correct function to achieve this?



Solution 1:[1]

The best model isn't saved in the package, it's saved in the Scan object:

bm.best_model(metric='loss', asc=False)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tian Welgemoed