Created
March 15, 2021 03:23
-
-
Save AyishaR/5d5a9c4aa96ae3c5415fbb5752f7f28c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onehot_labels = np.zeros((input_labels.size, n_classes)).astype(np.int32) | |
onehot_labels[np.arange(input_labels.size), input_labels] = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment