4

I have code in Tensorflow using convolution neural network to recognize the characters in street view Text (SVT) data.

Since the label type is string, what should I use instead of tf.nn.sparse_softmax_cross_entropy_with_logits() in the loss function?

I cannot use tf.nn.sparse_softmax_cross_entropy_with_logits() because the labels her must be an int dtype??

Stephen Rauch
  • 1,783
  • 11
  • 21
  • 34
AB_
  • 185
  • 2
  • 7

1 Answers1

2

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.

Zephyr
  • 997
  • 4
  • 10
  • 20
nKarza
  • 64
  • 1