Arizona
09/18/2024, 7:48 AMval input = floatArrayOf(
1F, 2F, 3F, 4F, 5F, 1F, 2F, 3F, 4F, 5F,
1F, 2F, 3F, 4F, 5F, 1F, 2F, 3F, 4F, 5F,
1F, 2F, 3F, 4F, 5F, 1F, 2F, 3F, 4F, 5F,
1F, 2F, 3F, 4F, 5F,
1F, 2F
) // Input data representing 37 answers to 37 questions respectively
and the execution model snippet:
loadModel(context)
.inferAndCloseUsing(ExecutionProvider.CPU()) { result ->
result.predictRaw(input) { output -> // predictRaw() require floatArray()
Log.e("TES MODEL =>", "Output: $output")
}
}
Log error: The number of elements (N=37) in the input tensor does not match the model input shape - [1, -1, 37]
Literaly, I understood the sentece. But, have no clue how to solve it. Thanks a lot
#kotlin-dl #C0B8M7BUY