from keras.utils.np_utils import * # 类别向量定义 b = [0, 1, 2, 3, 4, 5, 6, 7, 8] # 调用to_categorical将b按照9个类别来进行转换 b = to_categorical(b, 9) print(b)
来源:https://blog.csdn.net/moyu123456789/article/details/83444140
原文地址:https://www.cnblogs.com/yibeimingyue/p/11415654.html
时间: 2024-10-30 04:29:49