mirror of
https://github.com/BlackLight/micmon.git
synced 2024-11-27 22:25:13 +01:00
sparse_categorical_crossentropy as a string for back-compatibility with previous Keras versions
This commit is contained in:
parent
85f99e7362
commit
a1c8e6bee1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Model:
|
||||||
# noinspection PyShadowingNames
|
# noinspection PyShadowingNames
|
||||||
def __init__(self, layers: Optional[List[Layer]] = None, labels: Optional[List[str]] = None,
|
def __init__(self, layers: Optional[List[Layer]] = None, labels: Optional[List[str]] = None,
|
||||||
model: Optional[_Model] = None, optimizer: Union[str, optimizers.Optimizer] = 'adam',
|
model: Optional[_Model] = None, optimizer: Union[str, optimizers.Optimizer] = 'adam',
|
||||||
loss: Union[str, losses.Loss] = losses.SparseCategoricalCrossentropy(from_logits=True),
|
loss: Union[str, Union[str, losses.Loss]] = 'sparse_categorical_crossentropy',
|
||||||
metrics: List[Union[str, metrics.Metric]] = ('accuracy',),
|
metrics: List[Union[str, metrics.Metric]] = ('accuracy',),
|
||||||
low_freq: int = AudioSegment.default_low_freq,
|
low_freq: int = AudioSegment.default_low_freq,
|
||||||
high_freq: int = AudioSegment.default_high_freq):
|
high_freq: int = AudioSegment.default_high_freq):
|
||||||
|
|
Loading…
Reference in a new issue