Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi_label_classification增量训练 #559

Open
guowhite opened this issue Apr 29, 2020 · 7 comments
Open

multi_label_classification增量训练 #559

guowhite opened this issue Apr 29, 2020 · 7 comments
Assignees

Comments

@guowhite
Copy link

请问下 multi_label_classification增量训练 ernie可以实现吗?已经训练好模型了,需要新增数据继续训练,需要如何修改配置

@Steffy-zxf
Copy link
Contributor

你好!你说的增量训练是指迁移学习Fine-tune吗?如果是的话,可以参考我们的demo,https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.6/demo/multi_label_classification

@guowhite
Copy link
Author

@Steffy-zxf 你好!不是利用词向量迁移学习。而是断点训练,我已经迁移学习Fine-tune训练好了模型,但需要load bestmodel后 使用新增加数据,在原模型的基础上进行训练。

@Steffy-zxf
Copy link
Contributor

如果是想基于之前保存的checkpoint继续训练,可以将epoch设置更大些,RunConfig中checkpoint_dir设置与之前的ckpt文件路径相同,task.finetune_and_eval()接口会自动加载ckpt文件保存的最后一个step模型参数。

@Steffy-zxf Steffy-zxf self-assigned this Apr 29, 2020
@guowhite
Copy link
Author

好的!十分感谢

@x330930520
Copy link

你好 请问下我之前训练的epoch是10, 然后增量数据接着训练把epoch调到比10大就会报错 请问这个改怎么解决呢
15

@Steffy-zxf
Copy link
Contributor

@x330930520 你好!以上错误是paddlehub低版本的bug。请升级paddlehub (1.7.1)和 paddle(1.8.1)为最新版本。重新训练之后,即可增量训练。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants