Skip to content
Discussion options

You must be logged in to vote

Thanks for your script. The problem is that the computation of AUC score takes the class probability instead of class labels as the input. So you don't have to compute the out.argmax(dim=1). So the code in test() function should be:

y_pred_batch = F.softmax(out, dim=-1)[:, 1] # And don't forget the softmax operation to obtain the class probability

BTW, you need to use a large batch size (e.g., 512) since the dataset is imbalanced.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@eddyakiki
Comment options

@EdisonLeeeee
Comment options

@eddyakiki
Comment options

@EdisonLeeeee
Comment options

@eddyakiki
Comment options

Comment options

You must be logged in to vote
1 reply
@eddyakiki
Comment options

Answer selected by eddyakiki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants