所以我写了一个网络,其中包括以下多类分类:-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)
我的问题是我怎样才能将其转换回来以便使用它呢?