The following repository contains knowledge distillation code example for image classification task
All experiments are tracked with clearml: https://clear.ml/docs/latest/docs/
Environment created with poetry: https://python-poetry.org/docs/
To install dependeces: poetry install
To run training:
1. Student model: poetry run python3.11 -m src.train lightning_module=student_model
2. Teacher model: poetry run python3.11 -m src.train lightning_module=teacher_model
3. Knowledge distillation: poetry run python3.11 -m src.train
-
Setup ClearML: clearml-init
-
Migrate dataset to ClearML: make migrate_dataset
-
To download teacher model weights: make download_weights
Model | Test Set Accuracy % |
---|---|
Teacher | 91 |
Student | 86 |
Student with KD | 88 |