Skip to content

Instantly share code, notes, and snippets.

@radi-cho
Last active August 1, 2022 21:51
Show Gist options
  • Save radi-cho/e1c79b6598f52a53c8e27b505d88c86b to your computer and use it in GitHub Desktop.
Save radi-cho/e1c79b6598f52a53c8e27b505d88c86b to your computer and use it in GitHub Desktop.
tf.one_hot(tf.argmax(p), depth = len(p))
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0., 1., 0.], dtype=float32)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment