cail2019_track2 icon indicating copy to clipboard operation
cail2019_track2 copied to clipboard

请问run_pretrain.py和train.py有什么区别?

Open unstory opened this issue 5 years ago • 4 comments

基础比较差,没看懂。

unstory avatar Oct 15 '19 03:10 unstory

pretrain是预训练代码,一般来说,google的Bert是基于wiki的中文数据集预训练的,我们拿来做司法这种特殊领域需要现在司法数据上做预训练,训练完之后,我们再使用自己再次预训练后的模型去做下游任务,如这次的要素抽取,使用的代码就是train

| | m13021933043 邮箱:[email protected] |

Signature is customized by Netease Mail Master

在2019年10月15日 11:40,unstory 写道:

基础比较差,没看懂。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

HuiResearch avatar Oct 15 '19 03:10 HuiResearch

执行run_pretrain.py后,需要把train.py里面的bert_path,init_checkpoint这些参数改成预训练后的模型的路径吗?

unstory avatar Oct 16 '19 09:10 unstory

是的,init_checkpoint加载你预训练后的ckpt模型文件,config和vocab使用的文件和预训练一样

HuiResearch avatar Oct 16 '19 09:10 HuiResearch

感谢

unstory avatar Oct 16 '19 10:10 unstory