title: Using pytorch, how to write a jacobian matrix in the loss function？
body: <p>In knowledge distillation，we usually use Jacobian matching like this：<a href="https://i.stack.imgur.com/xnr1q.jpg" rel="nofollow noreferrer">T and S are the logits produced by the teacher network and student network</a></p>
  
  <p>Thank you very much！</p>