Skip to content

Instantly share code, notes, and snippets.

@greed2411
Last active May 30, 2018 08:23
Show Gist options
  • Save greed2411/cbbea173bf574ed3272de8527f1d7315 to your computer and use it in GitHub Desktop.
Save greed2411/cbbea173bf574ed3272de8527f1d7315 to your computer and use it in GitHub Desktop.
# onehot2labels()
def onehot2labels(y):
labels = []
for row_element in y:
labels.append(np.argmax(row_element))
return np.array(labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment