我正在尝试为二进制类打印 BERT 模型的混淆矩阵。我使用了在 https://github.com/raquelsilveira/bert_classification_text/blob/master/textClassification_ncv_Fine_Tunning_Bert_beta1.ipynb
实现的代码代码:
uf.custom_metrics(mean_of_conf_matrix_arrays, np.unique(y_test))
错误:
IndexError: index 2 is out of bounds for axis 1 with size 2
我该如何解决错误?