2025-03-24 7:46 AM
Could you please check if the attached .h5 model has anything wrong...
It is not analyzing and always producing error...
If anything is wrong... please correct it and resend please
Analyzing model
C:/Users/surya/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/10.0.0/Utilities/windows/stedgeai.exe analyze --target stm32h7 --name network -m C:/Users/surya/Downloads/updated_cnn.h5 --compression none --verbosity 1 --workspace C:/Users/surya/AppData/Local/Temp/mxAI_workspace1320364323860015601918210486046641 --output C:/Users/surya/.stm32cubemx/network_output
ST Edge AI Core v2.0.0-20049
E010(InvalidModelError): Couldn't load Keras model C:\Users\surya\Downloads\updated_cnn.h5,
Error when deserializing class 'InputLayer' using config={'batch_shape': [None, 128, 1], 'dtype': 'float32', 'sparse': False, 'name': 'input_layer_11'}.
Exception encountered: Unrecognized keyword arguments: ['batch_shape']
2025-03-24 8:48 AM
Hello @Pinagadi_Meghana,
There is probably something wrong happening during the conversion due to the input shape of your model.
I'll check and update you once I find the issue.
Have a good day,
Julian
2025-03-24 9:43 AM
Okay mam...
PLease update me as soon as possible
2025-03-26 3:30 AM
Hello @Pinagadi_Meghana ,
Keras3 is not currently supported but it will be in the next release of the ST Edge AI Core.
So either use a compatible version of keras
https://stedgeai-dc.st.com/assets/embedded-docs/supported_ops_keras.html
Or wait for next release (I think it should be updated in April)
Have a good day,
Julian
2025-03-27 7:05 AM
Should i change my model... like i should change any code...???
Please update mam...
If there is any change.... could you please recheck and send me the correct .h5 model
2025-03-27 7:34 AM
Hello @Pinagadi_Meghana ,
You need to downgrade your keras version to one supported :Keras 2.7.0
From the documentation I linked in my last message:
Keras is supported through the Tensorflow backend with channels-last dimension ordering. Keras.io 2.0 up to version 2.5.1 is supported, while networks defined in Keras 1.x are not officially supported. Up-to TF Keras 2.7.0 is supported.
I don't know how you obtained your model, but you need to install keras 2.7.0, not 3:
pip install keras==2.7.0
Have a good day,
Julian
2025-03-27 8:20 AM
I will tried it also mam... but the same error....
Please check and if possible send the model please