how to set specific indices to 1 in python for one hot encoding code example
Example: one hot encoding numpy
labels = (np.arange(num_labels) == labels[:,None]).astype(np.float32)
labels = (np.arange(num_labels) == labels[:,None]).astype(np.float32)