You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

加载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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 06:54:36