2019-11-05 04:59 AM
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.
2019-11-05 05:12 AM
Can you share the model you are importing using the tool ?
Thanks in advance
Regards
Daniel
2019-11-05 05:36 AM
Hi Daniel,
thanks for prompt reply from you! Attached please find the model. I downloaded the model from https://github.com/Shahnawax/HAR-CNN-Keras/blob/master/model.h5 and just renamed following the demonstration in the YouTube link.
I have not tried out with any other model though.
Thanks again
Regards
Achyut
2019-11-05 05:59 AM
Ok, this is the one from the training, it should pass without any problem, sounds more like an Windows / environment problem.
To answer your question there is no python prerequisite, the installation comes with all the precompiled modules that we need.
Are you on Windows 10 or still on Windows 7 ?
2019-11-05 06:30 AM
Hi Daniel,
Thanks a lot for clarification!
It's a Windows 7 machine.
I have tried by updating PATH environment inserting C:\Users\<user name>\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\4.1.0\Utilities\windows. The same error still appears. I have tried with stm32ai command line interface too using the following command:
stm32ai analyze -m <model_file_path> -c 4
which again throws the same error.
I have just noticed that in CLI the following tools_version checking command fails too
> stm32ai --tools_version
which throws similar error
However, this one works
> stm32ai --version
which returns 'stm32ai - Neural Network Tools for STM32 v1.1.0 (AI tools v4.1.0)'.
Best regards
Achyut
2019-11-05 06:38 AM
The build from the sources is done on a Windows 10 machine, in the user manual (UM2526) we explicitly mention a minimum version of Windows 10.
Regards
Daniel
2019-11-05 07:04 AM
Hi Daniel,
Many thanks! It's clear now.
For me with Windows 7 I will try with an older version of X-CUBE-AI.
Best regards
Achyut
2019-11-26 06:41 AM
Hi,
I had the same issue using Windows 10 Home 1909. On the manual (UM2526), the only requirements that I saw is Windows 10.
Here is the trace of the error, trying both with a custom network or with the one of the example:
eural Network Tools for STM32 v1.1.0 (AI tools v4.1.0)
[AI:cifar10net] TOOL ERROR: Traceback (most recent call last):
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
[AI:cifar10net] File "imp.py", line 296, in find_module
[AI:cifar10net] ImportError: No module named '_pywrap_tensorflow_internal'
[AI:cifar10net]
[AI:cifar10net] During handling of the above exception, another exception occurred:
[AI:cifar10net]
[AI:cifar10net] Traceback (most recent call last):
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
[AI:cifar10net] File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
[AI:cifar10net] File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
[AI:cifar10net] ImportError: DLL load failed: Routine di inizializzazione della libreria di collegamento dinamico (DLL) non riuscita.
[AI:cifar10net]
[AI:cifar10net]
[AI:cifar10net] Failed to load the native TensorFlow runtime.
[AI:cifar10net]
[AI:cifar10net] See https://www.tensorflow.org/install/errors
[AI:cifar10net]
[AI:cifar10net] for some common reasons and solutions. Include the entire stack trace
[AI:cifar10net] above this error message when asking for help.
[AI:cifar10net] Analyze fail on the AI model
[AI:cifar10net] Neural Network Tools for STM32 v1.1.0 (AI tools v4.1.0)
[AI:cifar10net] TOOL ERROR: Traceback (most recent call last):
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
[AI:cifar10net] File "imp.py", line 296, in find_module
[AI:cifar10net] ImportError: No module named '_pywrap_tensorflow_internal'
[AI:cifar10net]
[AI:cifar10net] During handling of the above exception, another exception occurred:
[AI:cifar10net]
[AI:cifar10net] Traceback (most recent call last):
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
[AI:cifar10net] File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
[AI:cifar10net] File "site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
[AI:cifar10net] File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
[AI:cifar10net] ImportError: DLL load failed: Routine di inizializzazione della libreria di collegamento dinamico (DLL) non riuscita.
[AI:cifar10net]
[AI:cifar10net]
[AI:cifar10net] Failed to load the native TensorFlow runtime.
[AI:cifar10net]
[AI:cifar10net] See https://www.tensorflow.org/install/errors
[AI:cifar10net]
[AI:cifar10net] for some common reasons and solutions. Include the entire stack trace
[AI:cifar10net] above this error message when asking for help.
[AI:cifar10net] Analyze fail on the AI model
Best regards,
Alessio Burrello
2021-05-16 01:46 AM
Hi Alessio, did you actually solve this problem? I have actually been stuck at the same issue for a few days, do you have any suggestion on how to solve it? I found some other similar problems to this but none of them was answered with a solution.
2023-05-29 07:41 AM - edited 2023-11-20 09:31 AM
Hi, i have the same problem.
I can generate an analysis base on comand windows in cmd console.
------ ----------------- ------------------------- ------------------------- ------
macc=6,532,325 weights=626,620 act=259,200 ram_io=3,300
Creating txt report file C:\WINDOWS\system32\stm32ai_output\network_analyze_report.txt
elapsed time (analyze): 113.465s
But it is not posible to obtain by cube mx
Any idea about how obtain at least the log failed test.
Thanks a lot for your time, T