Skip to content

Change the timing to print model setup info #335

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

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions torchdistill/core/distillation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def setup_teacher_student_models(self, teacher_config, student_config):
teacher_ref_model = unwrapped_org_teacher_model
student_ref_model = unwrapped_org_student_model
if len(teacher_config) > 0 or (len(teacher_config) == 0 and self.teacher_model is None):
logger.info('[teacher model]')
model_type = 'original'
auxiliary_teacher_model_wrapper = \
build_auxiliary_model_wrapper(teacher_config, teacher_model=unwrapped_org_teacher_model,
Expand All @@ -65,6 +66,7 @@ def setup_teacher_student_models(self, teacher_config, student_config):
load_ckpt(src_teacher_ckpt_file_path, self.teacher_model)

if len(student_config) > 0 or (len(student_config) == 0 and self.student_model is None):
logger.info('[student model]')
model_type = 'original'
auxiliary_student_model_wrapper = \
build_auxiliary_model_wrapper(student_config, student_model=unwrapped_org_student_model,
Expand Down
1 change: 1 addition & 0 deletions torchdistill/core/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def setup_model(self, model_config):
self.target_model_pairs.clear()
ref_model = unwrapped_org_model
if len(model_config) > 0 or (len(model_config) == 0 and self.model is None):
logger.info('[student model]')
model_type = 'original'
auxiliary_model_wrapper = \
build_auxiliary_model_wrapper(model_config, student_model=unwrapped_org_model, device=self.device,
Expand Down