小编mem*_*mis的帖子

如何使用sklearn的keras模型分类报告?

所以我写了一个网络,其中包括以下多类分类:-y_labels用to_categorical -last层转换使用sigmoid函数和3个神经元作为我的类-model编译使用categorical_crossentropy作为损失函数所以我用过

 model.predict_classes(x_test)
Run Code Online (Sandbox Code Playgroud)

然后我用它作为

   classification_report(y_test,pred)
Run Code Online (Sandbox Code Playgroud)

y_test的格式为to_categorical我收到以下错误:

ValueError: Mix type of y not allowed, got types set(['binary', 'multilabel-indicator'])
Run Code Online (Sandbox Code Playgroud)

我的问题是我怎样才能将其转换回来以便使用它呢?

scikit-learn keras

2
推荐指数
1
解决办法
3316
查看次数

标签 统计

keras ×1

scikit-learn ×1