2023-07-11 11:44 PM
Hi,
I am trying to use a QKeras model with mixed precision on STM32H747I-DISCO board. I run ‘Analyze’ my QKeras model using stmai 8.1.0, but encountered the following error. I tried an old version of QKeras, but got a different error.
I would appreciate any help on how to solve this issue?
Thanks in advance!
------------- error -------------
>>> stm32ai validate --model model_test.h5 --allocate-inputs --allocate-outputs --relocatable --compression none --optimization balanced --name network --workspace workspace --output output
Neural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520)
E010(InvalidModelError): Couldn't load Keras model model_test.h5,
error: Error when deserializing class 'QBatchNormalization' using config={'name': 'bn_0', 'trainable': True, 'dtype': 'float32', 'axis': [3], 'momentum': 0.99, 'epsilon': 0.001, 'center': True, 'scale': True, 'beta_initializer': {'class_name': 'Zeros', 'config': {}, 'shared_object_id': 6}, 'gamma_initializer': {'class_name': 'Ones', 'config': {}, 'shared_object_id': 7}, 'moving_mean_initializer': {'class_name': 'Zeros', 'config': {}, 'shared_object_id': 8}, 'moving_variance_initializer': {'class_name': 'Ones', 'config': {}, 'shared_object_id': 9}, 'beta_regularizer': None, 'gamma_regularizer': None, 'beta_constraint': None, 'gamma_constraint': None, 'beta_quantizer': None, 'gamma_quantizer': None, 'mean_quantizer': None, 'variance_quantizer': None, 'inverse_quantizer': None, 'beta_range': None, 'gamma_range': None}.
Exception encountered: ('Keyword argument not understood:', 'inverse_quantizer')
2023-07-12 06:35 AM
Can you share your model (even with fake weights) so we can try to fix the issue
Regards
Daniel
2023-07-12 07:50 PM