From 7e786019068ac56af6cedd357316892628234f6e Mon Sep 17 00:00:00 2001 From: kimtaesoo7 Date: Wed, 25 Sep 2024 17:37:03 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20AI=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=20=EB=A7=9E=EC=B6=94=EA=B8=B0=20=20S11P21S00?= =?UTF-8?q?2-224?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worlabel/domain/result/entity/Optimizer.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java b/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java index f31fd92..8546b02 100644 --- a/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java +++ b/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java @@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonValue; public enum Optimizer { - AUTO("AUTO"), + AUTO("auto"), SGD("SGD"), - ADAM("ADAM"), - ADAMW("ADAMW"), - NADAM("NADAM"), - RADAM("RADAM"), - RMSPROP("RMSPROP"); + ADAM("Adam"), + ADAMW("AdamW"), + NADAM("NAdam"), + RADAM("RAdam"), + RMSPROP("RMSProp"); private final String value; @@ -22,11 +22,11 @@ public enum Optimizer { @JsonCreator public static Optimizer from(String value) { for (Optimizer status : Optimizer.values()) { - if (status.getValue().equals(value.toUpperCase())) { + if (status.getValue().equalsIgnoreCase(value)) { return status; } } - return null; + throw new IllegalArgumentException("Unknown optimizer: " + value); } @JsonValue