随笔分类 -  每日 Bug

记录日常 bug
摘要:问题起源于为了完成一个多任务的训练,自己写了个 BatchSampler,如下: class MultiTaskBatchSampler(BatchSampler): def __init__(self, datasets: MultiTaskDataset, batch_size: int, sh 阅读全文
posted @ 2020-12-11 17:42 GNEPIUHUX 阅读(162) 评论(0) 推荐(0)
摘要:在使用 LSTM+CRF 做 NER 时,使用的 CRF 实现来自简明条件随机场CRF介绍,loss 的输出维度是 (bs,) 而由于自己不清楚 mask 的使用方式,在 Embedding 层中加入了 mask_zero=True,同时在后面使用了 Masking 层,导致出现以下错误: tens 阅读全文
posted @ 2020-06-08 10:44 GNEPIUHUX 阅读(636) 评论(0) 推荐(0)
摘要:使用sklearn中f1_score过程中的警告 警告信息:UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples. 'precision', 'p 阅读全文
posted @ 2020-06-08 10:25 GNEPIUHUX 阅读(665) 评论(0) 推荐(0)