Solved by chetan_patil in post #2 
              
              
                Hi, 
Classes must span between 0 to N-1( 22 ). I think your classes span from 1 to 23. 
Change batch_y to span between 0 to 22, and keep your output neurons to 23. 
I suspect this is the issue.!