Skip to content

Commit

Permalink
(#3) Defense: Apply ReduceLROnPlateau
Browse files Browse the repository at this point in the history
  • Loading branch information
betarixm committed May 24, 2022
1 parent e635e5f commit 109cff1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/defense/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ def predict(epoch, logs):
step=epoch,
)

return [keras.callbacks.LambdaCallback(on_epoch_end=predict)]
reduce_lr = keras.callbacks.ReduceLROnPlateau(
monitor="val_loss", factor=0.2, patience=5, min_lr=0.001
)

return [reduce_lr, keras.callbacks.LambdaCallback(on_epoch_end=predict)]


class Denoiser(Defense):
Expand Down

0 comments on commit 109cff1

Please sign in to comment.