def build_kd_probes_loss(teacher_logits, student_logits, task_balance=0.3, distill_tempreture=2.0, labels=None, loss_type='mse'):
    teacher_n_layers = (len(teacher_logits) - 1)
    student_n_layers = (len(student_logits) - 1)
    probes_kd_loss = 0.0
    for i in range(student_n_layers):
        proportional_layer_idx = int(math.ceil(((i * teacher_n_layers) / student_n_layers)))
        student_layer_logits = student_logits[i]
        teacher_layer_logits = teacher_logits[proportional_layer_idx]
        probes_kd_loss += build_kd_loss(teacher_logits=teacher_layer_logits, student_logits=student_layer_logits, task_balance=task_balance, distill_tempreture=distill_tempreture, labels=labels, loss_type=loss_type)
    return probes_kd_loss
def build_kd_probes_loss(teacher_logits, student_logits, task_balance=0.3, distill_tempreture=2.0, labels=None, loss_type='mse'):
    teacher_n_layers = (len(teacher_logits) - 1)
    student_n_layers = (len(student_logits) - 1)
    probes_kd_loss = 0.0
    for i in range(student_n_layers):
        proportional_layer_idx = int(math.ceil(((i * teacher_n_layers) / student_n_layers)))
        student_layer_logits = student_logits[i]
        teacher_layer_logits = teacher_logits[proportional_layer_idx]
        probes_kd_loss += build_kd_loss(teacher_logits=teacher_layer_logits, student_logits=student_layer_logits, task_balance=task_balance, distill_tempreture=distill_tempreture, labels=labels, loss_type=loss_type)
    return probes_kd_loss