from tensorflow.keras.utils import to_categorical
y_test = to_categorical(y_test, 10)

레이블링된 y_test는 10가지 값을 가지고 있다. 

to_categorical(y_test, 10) 원핫인코딩으로 바꿀 데이터 y_test와 범주 10을 대입해주면 된다.

+ Recent posts