加载RoBERTa模型时出现权重未初始化警告的原因及解决方法咨询
加载RoBERTa模型时出现权重未初始化警告的原因及解决方法咨询
嘿,我最近碰到个问题,想过来请教下各位大佬。我从指定checkpoint加载RoBERTa模型后,弹出了权重未初始化的警告,具体情况如下:
我是这样加载训练好的模型的:
model = RobertaModel.load_from_checkpoint(checkpoint_path=<path>) model.freeze()
然后收到了这样的警告:
Some weights of RobertaModel were not initialized from the model
checkpoint at roberta-base and are newly initialized:
['roberta.pooler.dense.bias', 'roberta.pooler.dense.weight']
You should probably TRAIN this model on a down-stream task to be able
to use it for predictions and inference.
想问问大家,为啥会出现这个警告呀?有没有什么办法能解决或者合理忽略这个问题呢?麻烦各位帮忙解答下,谢谢啦!
备注:内容来源于stack exchange,提问作者D C
相关产品推荐
相关产品推荐

