Open exitxingling opened 4 years ago
hello,我想问一下这里对label的处理,this_label = int(label[i])-1,下载下来的数据集中的label的标签是从0到15的,这里0-1的话就变成-1了? def preprocess_label(label, cls_num): label_out = [] tmp = [] for i in range(len(label)): this_label = int(label[i]) - 1 for j in range(cls_num): if j == this_label: tmp.append(1.) else: tmp.append(0.) label_out.append(tmp) tmp = [] return label_out
您好,
非常感谢您对这项工作的兴趣
目前来看这里可能是一个bug 我会check之后进行更新
hello,我想问一下这里对label的处理,this_label = int(label[i])-1,下载下来的数据集中的label的标签是从0到15的,这里0-1的话就变成-1了? def preprocess_label(label, cls_num): label_out = [] tmp = []
for i in range(len(label)): this_label = int(label[i]) - 1 for j in range(cls_num): if j == this_label: tmp.append(1.) else: tmp.append(0.) label_out.append(tmp) tmp = [] return label_out