-
Notifications
You must be signed in to change notification settings - Fork 220
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
How to save ONLY studuent ckpt? #594
Comments
Hi, I have the same problem, how can I get the I made the same observation as @MR-hyj: the final checkpoint at the end of a distillation training is as heavier as the sum of both checkpoint files of the student and the teacher seperated. I guess it is more convenient to resume a training, but it would be helpful to have access to the checkpoint of the student only. |
Say the training network |
Ok thank you, I will try this |
There are also tools in MMRazor that you can use to avoid customizing checkpoints in tools/model_converters/, especially convert_kd_ckpt_to_student.py #381 |
Checklist
Describe the question you meet
I'm working on a yolov8 distillation project, which involves:
yolov8_teacher_cfg.py
(done)yolov8_student_cfg.py
(done).pth
to.onnx
using mmdeploy (done).pth
to.onnx
using mmdeployI figured it out to customize a configure, i.e.
distill_cfg.py
, to distill the student and it worked out.In order to convert the distilled student model to
.onnx
, I suppose:.pth
files.However, it seems that mmrazor saves both teacher and student meta info in its ckpt, i.e.
mmrazor_distill.pth
.Yet another problem (maybe easy to solve), student model and teacher model is named after
architecture
andteacher
respectively in mmrazor. In my case, usingmodel
instead ofarchitecture
when saving the distilled student model would be very helpful.Thank you for any suggestion!
The text was updated successfully, but these errors were encountered: