Skip to main content
ABora.3
Associate
November 5, 2019
Question

X-CUBE-AI: error while analyzing model

  • November 5, 2019
  • 13 replies
  • 5286 views

Hi,

I have followed the tutorial https://www.youtube.com/watch?v=grgNXdkmzzQ&t=4s to test X-CUBE-AI with CubeMX5.0.1, but the step 'Analysis' just end with an error message without any details. I have received the same error with CubeIDE which comes with integrated CubeMX.

If I try to run 'Analysis' of the same model after selecting the board I receive the error as shown below. Could anyone please help me in figuring out where could be the problem? Do I require to install Python to run X-Cube-AI? That is not mentioned in the users manual or tutorial.

Thank you in advance!

Achyut

The error:

--------------

Analyzing model 

Neural Network Tools for STM32 v1.1.0 (AI tools v4.1.0) 

TOOL ERROR: Traceback (most recent call last): 

  File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 

  File "imp.py", line 296, in find_module 

ImportError: No module named '_pywrap_tensorflow_internal' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 

  File "site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> 

  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module 

  File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module> 

  File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper 

  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module 

ImportError: DLL load failed with error code -1073741795 

Failed to load the native TensorFlow runtime. 

See https://www.tensorflow.org/install/errors 

for some common reasons and solutions.  Include the entire stack trace 

above this error message when asking for help.

    This topic has been closed for replies.

    13 replies

    fauvarque.daniel
    ST Employee
    May 29, 2023

    can you see if you have the same behavior when you actually add the X-CUBE-AI extension in an MX project, not only the MCU finder.

    tcg
    Associate III
    May 29, 2023

    That is the point, I want to know which MCU of your roadmap has enough flash/ram to run the NN.

    For sure selected is not enougth.

    We can talk in private and then add here the conclusion. Kind regards, T


    _legacyfs_online_stmicro_images_0693W00000bl444QAA.png

    fauvarque.daniel
    ST Employee
    May 30, 2023

    From what I can see your model doesn't go through the stm32ai command line, you probably have more info either in the STM32CubeMX log or doing Windows->Output in MX.

    Are you using the same version of the command line when it succeeded ?

    Above you have weights=626,620 act=259,200 ram_io=3,300, you can add to that around 30k of flash for the library so you'll need an mcu with at least 660k of flash and 270k of ram. Of course on top of that you need to add the space for your program.

    Regards