以下是缩写的代码:

for i in range(len(labels)):
    x = int(labels[i])  # 标签值
    y = cnn_predicted[i]  # cnn预测值
    z = predicted.tolist()[i]  # gru预测值
    label_num[x] += 1
    cnn_tpr[y] += 1
    gru_tpr[z] += 1
    cnn_num[x] += (x == y)
    gru_num[x] += (x == z)
for i in rangelenlabels x = intlabelsi # 标签值 y = cnn_predictedi # cnn预测值 z = predictedtolisti # gru预测值 label_numx += 1 cnn_tpry += 1

原文地址: http://www.cveoy.top/t/topic/iXw5 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录