In CNTK I need a way to convert a vector that contains labels as indices (just a regular vector, not a sparse representation) to a one hot-representation.
Here is an example for 5 classes:
Input
[2, 0, 1, 1]
Desired output:
[[0,0,1,0,0],
[1,0,0,0,0],
[0,1,0,0,0],
[0,1,0,0,0]]
Is there a way without going through Python/numpy?