IndexError: arrays used as indices must be of integer (or boolean) type
显示索引必须为整数或者布尔型类型的数据,此时我们只要将浮点型数据’y_train’更改为整数类型数据即可.
代码更改如下(示例):
y_true=oneHot[y_train.astype(int)]
IndexError: arrays used as indices must be of integer (or boolean) type
显示索引必须为整数或者布尔型类型的数据,此时我们只要将浮点型数据’y_train’更改为整数类型数据即可.
代码更改如下(示例):
y_true=oneHot[y_train.astype(int)]