Skip to main content
TGan.2
Visitor II
November 12, 2020
Question

Accuracy metric on new X-Cube-AI Version 5.2.0

  • November 12, 2020
  • 1 reply
  • 1391 views

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.

    This topic has been closed for replies.

    1 reply

    Gln
    ST Employee
    November 12, 2020

    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

    XWang.31
    Visitor II
    November 12, 2020

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