what is the loss function in char recognition using Tensorflow?
The loss function is correct, you just need to convert categorical variables into numerical representations using one-hot vector encoding. Please take a look at this.