Solved by Nikronic in post #2 
              
              
                Hi, 
Actually, you need to use indices as you have mentioned. No need to convert to one hot. 
Here is the official doc. 
Bests