Closed coolcodecding closed 3 years ago
Could you put an example in the README of how to deal with multiple outputs?
I have a model with 2 outputs (softmax) and changed the following lines in the code:
#define NUMBER_OF_OUTPUTS 2
float output[2] = {}; float predicted = ml.predict(input, output);
and Serial.println(predicted[1]); as I want to get the second output.
Serial.println(predicted[1]);
I get the following error:
error: invalid types 'float[int]' for array subscript Serial.println(predicted[1]); ^
Thanks!
I will do it
Sorry to have not replied earlier, I totally forgot this issue. Try to print output[1]
See #10
Could you put an example in the README of how to deal with multiple outputs?
I have a model with 2 outputs (softmax) and changed the following lines in the code:
#define NUMBER_OF_OUTPUTS 2
and
Serial.println(predicted[1]);
as I want to get the second output.I get the following error:
Thanks!