I have been trying to create an IOS App using coreML, I have trained a convolutional neural network in Keras, when I use CoreMLTools to transform this model to a CoreML model it shows that the output is a multidimensional array, but I want it to be a class probability. How do I generate a .txt file with the class labels in Keras?
This is the code I use to generate a coreML model:
import coremltools
coreml_model = coremltools.converters.keras.convert(
"chars74kV3.0.h5", class_labels = "class_labels.txt", image_input_names= ['input'], input_names=['input'], image_scale=255.)
coreml_model.author = 'Thijs van der Heijden'
coreml_model.license = 'MIT'
coreml_model.description = 'A basic Deep Convolutional Neural Network to classify handwritten letters.'
coreml_model.input_description['input'] = 'A 64x64 pixel Image'
coreml_model.save('chars74k.mlmodel')