diff --git a/talos/templates/params.py b/talos/templates/params.py index a6b154d..8d73683 100644 --- a/talos/templates/params.py +++ b/talos/templates/params.py @@ -35,7 +35,6 @@ def titanic(debug=False): def iris(): from tensorflow.keras.optimizers.legacy import Adam, Adagrad - from tensorflow.keras.losses import LogCosh, categorical_crossentropy from tensorflow.keras.activations import relu, elu, softmax # here use a standard 2d dictionary for inputting the param boundaries @@ -49,7 +48,7 @@ def iris(): 'emb_output_dims': [None], 'shapes': ['brick', 'triangle', 0.2], 'optimizer': [Adam, Adagrad], - 'losses': [LogCosh, categorical_crossentropy], + 'losses': ['LogCosh', 'categorical_crossentropy'], 'activation': [relu, elu], 'last_activation': [softmax]} @@ -59,7 +58,6 @@ def iris(): def breast_cancer(): from tensorflow.keras.optimizers.legacy import Adam, Adagrad, RMSprop - from tensorflow.keras.losses import LogCosh, binary_crossentropy from tensorflow.keras.activations import relu, elu, sigmoid # then we can go ahead and set the parameter space @@ -71,7 +69,7 @@ def breast_cancer(): 'dropout': (0, 0.5, 5), 'shapes': ['brick', 'triangle', 'funnel'], 'optimizer': [Adam, Adagrad, RMSprop], - 'losses': [LogCosh, binary_crossentropy], + 'losses': ['LogCosh', 'binary_crossentropy'], 'activation': [relu, elu], 'last_activation': [sigmoid]} diff --git a/tests/commands/test_templates.py b/tests/commands/test_templates.py index af64708..f1339f7 100644 --- a/tests/commands/test_templates.py +++ b/tests/commands/test_templates.py @@ -12,6 +12,7 @@ def test_templates(): talos.Scan(x, y, p, model, 'test_', round_limit=2) x, y = talos.templates.datasets.iris() + x = x[:50] y = y[:50] model = talos.templates.models.iris