From 4aac5e83e2d3e4d06971c9657a16335aaf6dbc98 Mon Sep 17 00:00:00 2001 From: beta Date: Thu, 24 Mar 2022 04:45:04 +0900 Subject: [PATCH] (#3) Reformer: Hotfix: Cannot use cross entropy --- src/defense/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defense/models.py b/src/defense/models.py index b8da84f..c3f27d4 100644 --- a/src/defense/models.py +++ b/src/defense/models.py @@ -16,7 +16,7 @@ def __init__( input_shape: tuple, name: str = "defense_reformer", optimizer: keras.optimizers.Optimizer = keras.optimizers.Adam(), - loss: keras.losses.Loss = keras.losses.SparseCategoricalCrossentropy(), + loss: keras.losses.Loss = keras.losses.MeanSquaredError(), accuracy: keras.metrics.Accuracy = keras.metrics.SparseCategoricalAccuracy( name="accuracy" ),