2025-07-11 6:04 AM
Hi everyone,
I have created a NN with tensorflow:
# ----- Model Definition -----
def build_model(input_dim):
model = Sequential([
InputLayer(shape=(input_dim,)),
Dropout(0.2),
Dense(128, activation='relu'), # increased layer size
Dense(64, activation='relu'),
Dense(32, activation='relu'),
Dense(1, activation='linear')
])
model.compile(optimizer='adam', loss='mse', metrics=['mae'])
return model
model = build_model(X_train.shape[1])
When I import this into X-CUBE-AI in STMCubeMX and analyze it, there are no Errors. However when I press show Graph, you can see that it imported just a single layer, even though there should be 4.
When i upload the same model in ST Edge AI Developer Cloud, it does the layers correct:
I can even run the benchmark in the cloud on the same STM32H7 which I have physically on my desk and it works.
Because the layers are not detected correctly in my local STM32CubeMX, i get really bad performance when I validate the model. I also tried importing .h5 file, but it doesn't change. Is there some limitations in layers or do I need a special export of the model?
Solved! Go to Solution.
2025-07-16 12:52 AM
Hello @wga,
Yes, the 10.2.0 is out, for some reason, it does not show in cubeMX, but the version is stable.
You can download it from manual files:
To download the latest files:
X-CUBE-AI - AI expansion pack for STM32CubeMX - STMicroelectronics
Unzip the .pack file and select it in cubeMX while installing.
Let me know if it solves your issue.
Have a good day,
Julian
2025-07-15 7:42 AM
Hello @wga,
We had a bug regarding sequential model in tensorflow. It was fix in stedgeai core 2.2 (X Cube AI 10.2.0).
I think that in the dev cloud, it was using the newest version, but I think that in local with cubeMX you may be using an older version.
Could you please install the last version of X Cube AI (10.2.0) and tell me if it solved your issue.
You may have to install this update using local files that you can download here:
X-CUBE-AI - AI expansion pack for STM32CubeMX - STMicroelectronics
Have a good day,
Julian
2025-07-16 12:47 AM
Hi Julian,
thanks for the answer. It seems that 10.2.0 didn't get fully distributed. My CubeMX and STMCubeIDE doesnt detect any available updates for the component.
On Developer Cloud i can select ST Edge AI Core 2.1.0 and it works as well. Is it possible to manually install 10.2.0? Would you recommend that?
2025-07-16 12:52 AM
Hello @wga,
Yes, the 10.2.0 is out, for some reason, it does not show in cubeMX, but the version is stable.
You can download it from manual files:
To download the latest files:
X-CUBE-AI - AI expansion pack for STM32CubeMX - STMicroelectronics
Unzip the .pack file and select it in cubeMX while installing.
Let me know if it solves your issue.
Have a good day,
Julian
2025-07-16 5:54 AM
Hi Julian,
with Version 10.2.0 it is working. Thanks for the support :thumbs_up: