模型蒸馏训练导出的问题
#12454
Replies: 1 comment
-
从best文件中提取出student2模型文件后,测试精度 hmean: 0.90 与训练中验证精度 0.92比较接近。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
参考 知识蒸馏配置 文本检测模型配置,使用ch_PP-OCRv3_det_cml.yml的配置文件。

训练后 hmean :0.92
通过如下代码从训练保存的best文件中提取出student模型文件:
`
import paddle
all_params = paddle.load("best_accuracy.pdparams")
print(all_params.keys())
s_params = {key[len("Student."):]: all_params[key] for key in all_params if "Student." in key}
print(s_params.keys())
paddle.save(s_params, "student.pdparams")
`
再测试student.pdparams的精度,hemean仅为 0.003
这是什么原因。模型导出的有问题吗
Beta Was this translation helpful? Give feedback.
All reactions