You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear developers of LibAUC,
Thank you for open-sourcing your wonderful work! As I utilize the package's MultilabelAUCLoss for my multi-label classification task, I keep encountering an error: "IndexError: too many indices for tensor of dimension 1". I encounter the same error when running the provided example on the website:
I couldn't find more concrete examples regarding multi-label problems, I also tried to a few debuggings, including reshaping y_true to (32, 1), send all of them into the same device. However, I've yet figured out how to feed the correct shapes to the loss.
My specific problem involves calculating loss between pred=(batch, 3) and label=(batch) for a 3-class classification.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi Innoversa, thanks for your interest in our library. Since MultiLabelAUCMLoss is designed for multi-label classification tasks, the shape of y_true should be the same as the shape of y_pred. Therefore, there was a typo in the example code. We apologize for the caused confusion. You can try the example I've included below.
If you'd like to utilize MultiLabelAUCMLoss for multi-class classification, you might need to convert the multi-class labels to a multi-label format. For example, convert labels [0,1,1,2] to [[1,0,0], [0,1,0], [0,1,0], [0,0,1]].
Dear developers of LibAUC,
Thank you for open-sourcing your wonderful work! As I utilize the package's MultilabelAUCLoss for my multi-label classification task, I keep encountering an error:
"IndexError: too many indices for tensor of dimension 1"
. I encounter the same error when running the provided example on the website:I couldn't find more concrete examples regarding multi-label problems, I also tried to a few debuggings, including reshaping
y_true
to (32, 1), send all of them into the same device. However, I've yet figured out how to feed the correct shapes to the loss.My specific problem involves calculating loss between pred=(batch, 3) and label=(batch) for a 3-class classification.
Thank you!
The text was updated successfully, but these errors were encountered: