from keras.utils import to_categorical
import numpy as np
input_data = [1, 2, 3, 4, 5, 6, 7, 8, 9,0]
input_data = np.array(input_data)
input_data = to_categorical(input_data)
print(input_data)
再上一步中继续添加代码
input_data = np.argmax(input_data, axis=1)
print(input_data)
from keras.utils import to_categorical
import numpy as np
input_data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
input_data = np.array(input_data)
input_data = to_categorical(input_data)
print(input_data)
input_data = np.argmax(input_data, axis=1)
print(input_data)