keras中to_categorical()函数解析
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