set_teacher_train¶
Function¶
A method of the KnowledgeDistillConfig class. By calling this method, the teacher model is set to training mode. Typically, during distillation, only the student model's gradients are computed and updated, while the teacher model is used solely for inference, making this method unnecessary. However, for special requirements, you can call this method directly to put the teacher model into a gradient update state. It takes no input parameters.