Обратить один горячий кодирование питона Numpy
import numpy as np
class_labels = np.argmax(class_prob, axis=1) # assuming you have n-by-5 class_prob
Troubled Turkey
import numpy as np
class_labels = np.argmax(class_prob, axis=1) # assuming you have n-by-5 class_prob