-
Notifications
You must be signed in to change notification settings - Fork 96
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
网络如何进行微调和迁移学习 #12
Comments
在初始化模型之后,先导入模型参数即可。 `
` |
已试成功,非常感谢。那如果训练集类别个数与原先训练的权重类别不一样,那如何抑制后面的几层 |
由于你类别数都不一样,必须更改模型结构。 你可以这样更改,先初始化模型 -> 导入参数 -> 然后更改模型中的predictor 结构,也就是最后的分类和回归的几层。 这样的做法流程是:
` 这样做,模型前面的参数均是你训练好的参数,只有predictor 是随机初始化的,你可以使用这种方法进行迁移。 |
我原本的思路是只改predictor中分类的最后一个卷积层然后训练,但是现在想想那样可能效果并不好,还是应该像你这样,重新训练head部分。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我在一个数据集上训练得到一个权重,我想在另一个数据集上还用这个权重并进行训练,该怎么做呢
The text was updated successfully, but these errors were encountered: