(student, teacher)
| 4 | |
| 5 | |
| 6 | def init_student(student, teacher): |
| 7 | teacher_state_dict = teacher.state_dict() |
| 8 | info = student.load_state_dict(teacher_state_dict, strict=False) |
| 9 | assert info.missing_keys == [], info.missing_keys |
| 10 | return student, info |
| 11 | |
| 12 | |
| 13 | def copy_decoder_layers(teacher, student, l2copy=[0, 2, 4, 7, 9, 11]): |