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
Traceback (most recent call last):
File "D:\test\test.py", line 10, in <module>
conf_matrix.plot()
File "D:\test\.venv\lib\site-packages\torchmetrics\classification\confusion_matrix.py", line 466, in plot
fig, ax = plot_confusion_matrix(val, ax=ax, add_text=add_text, labels=labels)
File "C:\Users\Anton\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 79, in inner
return func(*args, **kwds)
File "D:\test\.venv\lib\site-packages\torchmetrics\utilities\plot.py", line 248, in plot_confusion_matrix
ax = axs[i] if rows != 1 and cols != 1 else axs
IndexError: index 9 is out of bounds for axis 0 with size 9
Environment
TorchMetrics version (and how you installed TM, e.g. conda, pip, build from source): 1.1.1, pip
Python & PyTorch Version (e.g., 1.0): 3.10.9, 2.0.1
Any other relevant information such as OS (e.g., Linux): Windows
The text was updated successfully, but these errors were encountered:
🐛 Bug
The specific values of
num_labels
inMultilabelConfusionMatrix
can throwIndexError
in theplot
function.The
_get_col_row_split
function fornum_labels=11
returnsrows=3, cols=3
, which is not enough for 11 axes.To Reproduce
Traceback
Environment
conda
,pip
, build from source): 1.1.1, pipThe text was updated successfully, but these errors were encountered: