Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eustin/571c3e833845d407d9f16ec4f58db6c6 to your computer and use it in GitHub Desktop.
Save eustin/571c3e833845d407d9f16ec4f58db6c6 to your computer and use it in GitHub Desktop.
per_example_loss = tf.reduce_sum(
relevance_grades_prob_dist * tf.math.log(relevance_grades_prob_dist / scores_prob_dist),
axis=-1
)
print(per_example_loss)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment