From 870f7ad6b4b5ff027d3cfd5c1417703204a12606 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 28 Oct 2020 19:44:36 +0100 Subject: [PATCH] keras.losses.Loss not available on previous versions --- micmon/model/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micmon/model/__init__.py b/micmon/model/__init__.py index 38751cb..f04f035 100644 --- a/micmon/model/__init__.py +++ b/micmon/model/__init__.py @@ -18,7 +18,7 @@ class Model: # noinspection PyShadowingNames def __init__(self, layers: Optional[List[Layer]] = None, labels: Optional[List[str]] = None, model: Optional[_Model] = None, optimizer: Union[str, optimizers.Optimizer] = 'adam', - loss: Union[str, Union[str, losses.Loss]] = 'sparse_categorical_crossentropy', + loss: str = 'sparse_categorical_crossentropy', metrics: List[Union[str, metrics.Metric]] = ('accuracy',), low_freq: int = AudioSegment.default_low_freq, high_freq: int = AudioSegment.default_high_freq):