Skip to content

Instantly share code, notes, and snippets.

@gaphex
Created June 13, 2019 15:13
Show Gist options
  • Select an option

  • Save gaphex/ffa4652f15410a3103dda0d8f24caccb to your computer and use it in GitHub Desktop.

Select an option

Save gaphex/ffa4652f15410a3103dda0d8f24caccb to your computer and use it in GitHub Desktop.
euclidean distance computation
squared_distance = tf.reduce_sum(tf.pow(Q - S, 2), reduction_indices=1)
distance = tf.sqrt(squared_distance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment