Skip to content

Instantly share code, notes, and snippets.

@zilunpeng
Created March 23, 2021 21:18
Show Gist options
  • Save zilunpeng/53a7a2cc53de0265686edb34c479b33f to your computer and use it in GitHub Desktop.
Save zilunpeng/53a7a2cc53de0265686edb34c479b33f to your computer and use it in GitHub Desktop.
Get log probability of student model. Code below is part of the knowledge distillation toolkit (https://git.io/JYePf).
student_net_output = self.student_model(*batch)
student_log_prob = student_net_output["log_prob"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment