cancel
Showing results for 
Search instead for 
Did you mean: 

the result of onnx model validate on target has two different output, why?

cxf
Associate III

hi

I have validate on the STM32N6 board by onnx model in STM32MX,but i have two different output ,like this:

 m_outputs_1: (10, 3)/float64, min/max=[-282.578064, 481.370483], mean/std=[-2.619613, 298.301398], output  m_outputs_2: (10, 1)/float64, min/max=[0.000000, 0.000000], mean/std=[0.000000, 0.000000], node_139  c_outputs_1: (10, 1, 1, 3)/float32, min/max=[-4.547175, 5.813805], mean/std=[0.008044, 4.321293], output  c_outputs_2: (10, 1, 1, 1)/float32, min/max=[0.000800, 0.000800], mean/std=[0.000800, 0.000000], node_139

the  m_outputs_1 is error, and c_outputs_1 is correct,why? what can lead to this problem?

please help me ,thanks very much!!!

I have upload the report.txt and onnx model in the attach.

25 REPLIES 25

Hi @SlothGrill 

 

Thank you for your help very much!!!

 

Now,I modified the config.json in the \X-CUBE-AI\10.2.0\scripts\N6_scripts  like this:

{

"compiler_type": "gcc",

    "gdb_server_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.100.202501151542/tools/bin/",
    "gcc_binary_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/",
    "iar_binary_path": "",
    "objcopy_binary_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/arm-none-eabi-objcopy.exe",
    "cubeProgrammerCLI_binary_path": "E:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe",
    "cubeide_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE"
}

 

and  get the same two results by  Julian E.'s five steps,like this:

cxf_0-1755068064842.png

By this way,I think I have validate on target successfully.

But when I go to STM32CubeMx,and click the validate on target,and check the Enabled,I still get the previous issues ,like this:

cxf_2-1755068603930.png

when I get the previous issues, I found that the config.json has been modified to like this:

  {
  "gdb_server_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.100.202501151542/tools/bin/",
    "gcc_binary_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/",
    "objcopy_binary_path": "E:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/arm-none-eabi-objcopy.exe",
    "cubeide_path": "",
    "compiler_type": "gcc",
    "cubeProgrammerCLI_binary_path": "E:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe",
    "iar_binary_path": ""
}

 As I have validate on target successfully by the first way(above-mentioned),

why it can generate this problem by use STM32CubeMX?

Is there any differences between two way?

 

Thanks!!!

I put the shell information  into the attach.

SlothGrill
ST Employee

Hello
I'm not sure to fully understand, but there is definitely a problem with your last config.json: setting "cubeide_path" to "" is not similar to fully removing the line (in the way the config file is parsed).

Setting it to "", indicates to the tool that you expect to find cubeide in your current directory, then when trying to find gdb_server in your current directory, everything fails.

So, if this is x-cube-ai who erased your config.json, then this is problematic :), but the main thing is that you now know how to perform a validation on target after editing your config file.

 

I don't really understand if there are still issues pending:

  • After editing the config.json, you manage to do a validation on target through X-Cube-AI
  • so, you can now perform validations on target with X-Cube-AI, right ?
  • Could you please "summarize" the "two ways" in a synthetic manner ? 

Thanks

Cheers.

 

Hi  @SlothGrill 

Thank you for your help very much!!!

The two methods  are like this:

First method:

  1. Go to: C:\Users\<your_user>\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\10.2.0\scripts\N6_scripts\
  2. Copy your model to the model folder (or directly in N6_script folder)
  3. Run the generate command:
    stedgeai generate -m your_model --target stm32n6 --st-neural-art 
  4. Run the n6_loader.py script with DK board plugged in dev mode: 
    python n6_loader.py
  5.  Run the validate on target command:
    stedgeai validate -m your_model --target stm32n6 --mode target -d serial:921600

Second method:

  1:go to stm32cubeMX,click the validate on target,and check the enabled,the click ok like this

cxf_0-1755134915915.png

 

 

The results is that I validate on target successfully by the first method,but get a problem by the second method.

I think the reason is that  config.json has been modified to  "cubeide_path""".but i do not know what lead to this

phenomenon?

 

Thanks!

 

SlothGrill
ST Employee

Hello
Agreed, it's a bug on X-Cube-AI, then, as setting the path to "" will most likely lead to buggy flow.

I guess X-Cube-AI checks if cubeide has been installed on "standard" paths (i.e. not E:), and fallback to setting the config to "" when not found.

We will post a bug for that.

 

Thanks.

Hi @SlothGrill when I can get the latest X-Cube-AI which can solve this bug? As i want to validate on target by STM32CubeMX. Thanks very much!!!
SlothGrill
ST Employee

Hello,

X-Cube-AI gets updated when new versions of STEdgeAI are released. So there will be no available versions with a fix before any new STEdgeAI release (i.e. do not expect anything before some months...).

For now, if you really want to use X-Cube-AI, you can try to reinstall CubeIDE properly and see if it fixes the issues (eventually removing the old versions that may lie around on your PC may help). Or try to install it on standard target directories (eg. c:\ST\...)

Best regards.