发现错误
JaykieLiu opened this issue · 1 comments
JaykieLiu commented
bert-for-task/albert_task/sentence_pair_task/data_helper.py 中
83-84行:
segment_ids.append([0] * (len(tokens_a) + 2))
segment_ids.append([1] * (len(tokens_b) + 1))
改为
segment_id =[]
segment_id.extend([0] * (len(tokens_a) + 2))
segment_id.extend([1] * (len(tokens_b) + 1))
segment_ids.append(segment_id)
bert-for-task/albert_task/sentence_pair_task/metrics.py 中
所有的if isinstance(pred_y[0], list):
改为:
if isinstance(pred_y.tolist()[0], list):
jiangxinyang227 commented
是的,你说的对,写的时候没注意,谢谢指出错误