Open szj2ys opened 1 month ago
https://github.com/shibing624/pytextclassifier/blob/master/pytextclassifier/bert_classfication_utils.py#L77C18-L77C18 early_stop 默认支持的。
方法2:设置epoch=10,每个epoch都保存模型,回头基于valid loss选择best epoch model.
1)我的基座用的是roberta,model_type=‘bert'和model_type='roberta'都能跑起来,但是model_type='roberta'训练的loss比model_type=‘bert',请问model_type具体是什么作用,对模型训练有什么影响? 2)我想用LongformerForSequenceClassification做分类,model_type要设置成什么?
https://github.com/shibing624/pytextclassifier/blob/master/pytextclassifier/bert_classfication_utils.py#L77C18-L77C18 early_stop 默认支持的。
方法2:设置epoch=10,每个epoch都保存模型,回头基于valid loss选择best epoch model.