mirror of
https://github.com/jung-geun/PSO.git
synced 2025-12-20 04:50:45 +09:00
23-07-11
one hot 인코딩 적용
This commit is contained in:
@@ -59,8 +59,11 @@ def make_model():
|
||||
model = make_model()
|
||||
x_train, y_train, x_test, y_test = get_data()
|
||||
|
||||
y_train = tf.one_hot(y_train, 10)
|
||||
y_test = tf.one_hot(y_test, 10)
|
||||
|
||||
model.compile(
|
||||
optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"]
|
||||
optimizer="adam", loss="categorical_crossentropy", metrics=["accuracy"]
|
||||
)
|
||||
|
||||
# model.compile(optimizer="adam", loss="mse", metrics=["accuracy"])
|
||||
|
||||
Reference in New Issue
Block a user