If you want to implement the regular offline knowledge distillation, there is no need to add the loss2, since the teacher should be trained already. The loss function for the student is the combination of teacher generated probabilities( high temperatured) and also the ground truth labels.