cancel
Showing results for 
Search instead for 
Did you mean: 

Accuracy metric on new X-Cube-AI Version 5.2.0

TGan.2
Associate

With the new X-Cube-AI Version 5.2.0, when I try to validate on desktop/validate on target, the metric for accuracy says "n/a" in the output report, with a note "ACC metric is not computed ("--classifier" option can be used to force it)". Does anyone know where I can access this "--classifier" option or how to get the accuracy of the model again?

It seems in the new version the main metric is l2r loss, however, it would be very helpful to get the accuracy metric again.

Thanks in advance for any help.

3 REPLIES 3
Gln
ST Employee

Hello @TGan.2​ 

This is because X-CUBE-AI did not detect your model as a classifier but rather like a regressor. Probably because your last layer is not a SoftMax layer.

To force the tool to treat you model as a classifier and get the confusion matrix and the ACC metric, you can use the  "--classifier" option through the command line interface:

$ stm32ai.exe validate path/to/model.tflite --classifier

To validate with given inputs/outputs:

$ stm32ai.exe validate path/to/model.tflite --classifier -vi input_tensors.csv -vo output_tensors.csv

Is it not supported in stm32cubeide? I've never set it up through the command line but always used the IDE...

hi @Gln​ , I have the same problem but I didn't understand where I have to put this command line. Can you please explain how to solve? Thank you.