python/tensorflow,keras
keras one-hot encoding
wjwkddyd221001
2022. 10. 5. 00:04
from tensorflow.keras.utils import to_categorical
train_y = to_categorical(train_y)
test_y = to_categorical(test_y)
print(train_y.shape, test_y.shape)