"T-shirt/top" , 1 to "Trouser" , 2 to "Pullover" , 3 to "Dress" , 4 to "Coat" , 5 to "Sandal" , 6 to "Shirt" , 7 to "Sneaker" , 8 to "Bag" , 9 to "Ankle boot " ) fun reshapeInput(inputData: FloatArray): Array<Array<FloatArray>> { val reshaped = Array ( 1 ) { Array(28) { FloatArray(28) } } for (i in inputData.indices) reshaped[0][i / 28][i % 28] = inputData[i ] return reshape d } fun main() { InferenceModel.load(File(PATH_TO_MODEL)).use { it.reshape(::reshapeInput ) val prediction = it.predict(test.getX(0) ) val actualLabel = test.getLabel(0 ) println("Predicted label is: $prediction. This corresponds to class ${stringLabels[prediction]}." ) println("Actual label is: $actualLabel." ) } }