title: How to get multiclass Keras model to output category name instead of probabilities?
body: <p>I understand the idea of passing labels in training data to a Keras model as a one-hot encoding, but I'm trying to create a model that will return a string during inference, and not a one-hot encoding that I'd have to decode myself.</p>
  <p>Specifically, I DON'T want to have to do the following:</p>
  <pre><code>encoder = LabelEncoder() 
  encoder = encoder.fit(labels)
  encoded_Y = encoder.transform(labels)
  y_true = np_utils.to_categorical(encoded_Y). # Model accepts this during training
  
  prediction = model.predict(query)
  label_string = encoder.inverse_transform(prediction)
  </code></pre>
  <p>How can I create a model that will call <code>.predict()</code> and return something customized, such as the string of the highest prediction and its corresponding probability?</p>