Slide 19
Slide 19 text
!#'%
KerasOneHotVactor
-*' &#$
import keras.utils as ku
class_ids = np.array([1, 0, 1, 1, 2, 0])
one_hots = ku.to_categorical(class_ids)
print(one_hots)
> [[0, 1, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1], [1, 0, 0]]
# [009] Make input and teacher data
"
(,cv2imread
Numpy)+
OK