My code is below:-
def test(dataloader,model):
y_score=[]
y=[]
for data in dataloader:
inputs, labels = data
outputs = model(inputs)
_, predicted = torch.max(outputs.data, 1)
c = (predicted == labels).squeeze().cpu().numpy()
y_score.append(outputs.cpu())
y.append(labels.cpu().numpy())
return y_score,y
y_score,y=test(test_loader,vgg)
b = y_score[0].detach().numpy()
c=np.array(y)
from sklearn import metrics
fpr, tpr, thresholds = metrics.roc_curve(c,b)
roc_auc = auc(fpr, tpr)
Error which I got is below:-
ValueError: unknown format is not supported
In this b is 2class classification and c is 5class classification.How to make c of 2 class from 5 class classification