How abcdpan/mt2kd works
MT²KD trains teacher-side classifiers at selected temperatures, then distills a student using those classifiers and a frozen teacher. The repository also includes a general teacher/student distillation workflow with multiple losses, including CRD, plus CIFAR-100 and ImageNet data support. The diagram captures documented workflow stages and source-visible calls; unsampled training logic and optional method wiring are not inferred.
Main entry points: train_student.py General distillation · train_student_muilti_to_muilti.py Multi-temperature student · train_teacherCls.py Teacher classifiers · models Teacher networks
Components 18
Training workflows
- Teacher classifiers
MT2KD/train_teacherCls.py - Multi-temperature student
MT2KD/train_student_muilti_to_muilti.py - General distillation
train_student.py - Teacher training
train_teacher.py
Networks and losses
- Teacher networks
models - Student networks
models - Multi-head classifiers
models/resnet_multiCls.py - Classifier module
models/classifier.py - Distillation losses
distiller_zoo - CRD objective
crd/criterion.py - Contrast memory
crd/memory.py
Datasets
- CIFAR-100 loaders
dataset/cifar100.py - ImageNet loaders
dataset/imagenet.py
Training support
- Distillation loop
helper/loops.py - MT²KD loop
MT2KD/loops_ours.py - Feature adapters
models/util.py - Metrics and schedules
helper/util.py
Other components
- Researcher
Connections 27
- Researcher → Teacher classifiers: trains classifiers
README.md - Researcher → Multi-temperature student: trains student
README.md - Teacher classifiers → CIFAR-100 loaders: loads data
MT2KD/train_teacherCls.py - Teacher classifiers → ImageNet loaders: loads data
MT2KD/train_teacherCls.py - Teacher classifiers → Teacher networks: loads teacher
MT2KD/train_teacherCls.py - Teacher classifiers → Multi-head classifiers: trains classifier
- Multi-temperature student → Teacher networks: loads teacher
MT2KD/train_student_muilti_to_muilti.py - Multi-temperature student → Student networks: builds student
MT2KD/train_student_muilti_to_muilti.py - Multi-temperature student → Multi-head classifiers: loads classifiers
README.md - Multi-temperature student → CIFAR-100 loaders: loads data
MT2KD/train_student_muilti_to_muilti.py - Multi-temperature student → ImageNet loaders: loads data
MT2KD/train_student_muilti_to_muilti.py - Multi-temperature student → MT²KD loop: runs training loop
MT2KD/train_student_muilti_to_muilti.py - Teacher training → Teacher networks: builds teacher
train_teacher.py - Teacher training → CIFAR-100 loaders: loads data
train_teacher.py - Teacher training → Distillation loop: uses training loop
train_teacher.py - General distillation → Student networks: builds student
train_student.py - General distillation → Teacher networks: loads teacher
train_student.py - General distillation → CIFAR-100 loaders: loads data
train_student.py - General distillation → ImageNet loaders: loads data
- General distillation → Distillation losses: selects loss
train_student.py - General distillation → CRD objective: builds CRD loss
train_student.py - General distillation → Distillation loop: runs training loop
train_student.py - CRD objective → Contrast memory: computes contrast
crd/criterion.py - Multi-temperature student → Feature adapters: uses adapters
MT2KD/train_student_muilti_to_muilti.py - MT²KD loop → Metrics and schedules: uses metrics
MT2KD/loops_ours.py - Distillation loop → Metrics and schedules: uses metrics
helper/loops.py - General distillation → Feature adapters: builds adapters
train_student.py