Feat: AI 데이터 형식 맞추기 S11P21S002-224
This commit is contained in:
parent
b9b9e0d8b4
commit
7e78601906
@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
|
|
||||||
public enum Optimizer {
|
public enum Optimizer {
|
||||||
|
|
||||||
AUTO("AUTO"),
|
AUTO("auto"),
|
||||||
SGD("SGD"),
|
SGD("SGD"),
|
||||||
ADAM("ADAM"),
|
ADAM("Adam"),
|
||||||
ADAMW("ADAMW"),
|
ADAMW("AdamW"),
|
||||||
NADAM("NADAM"),
|
NADAM("NAdam"),
|
||||||
RADAM("RADAM"),
|
RADAM("RAdam"),
|
||||||
RMSPROP("RMSPROP");
|
RMSPROP("RMSProp");
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
@ -22,11 +22,11 @@ public enum Optimizer {
|
|||||||
@JsonCreator
|
@JsonCreator
|
||||||
public static Optimizer from(String value) {
|
public static Optimizer from(String value) {
|
||||||
for (Optimizer status : Optimizer.values()) {
|
for (Optimizer status : Optimizer.values()) {
|
||||||
if (status.getValue().equals(value.toUpperCase())) {
|
if (status.getValue().equalsIgnoreCase(value)) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unknown optimizer: " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonValue
|
@JsonValue
|
||||||
|
Loading…
Reference in New Issue
Block a user