Skip to content

Commit b9cfeac

Browse files
committed
[Improvement]
Init teacher weight if without teacher_ckpt
1 parent a27952d commit b9cfeac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmrazor/models/algorithms/distill/configurable/single_teacher_distill.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def __init__(self,
5656
f'{type(teacher)}')
5757

5858
self.teacher = teacher
59+
self.teacher.init_weights()
5960
if teacher_ckpt:
6061
# avoid loaded parameters be overwritten
61-
self.teacher.init_weights()
6262
_ = load_checkpoint(self.teacher, teacher_ckpt)
6363
self.teacher_trainable = teacher_trainable
6464
if not self.teacher_trainable:

0 commit comments

Comments
 (0)