ARM-software / ML-KWS-for-MCU

Keyword spotting on Arm Cortex-M Microcontrollers
Apache License 2.0
1.13k stars 417 forks source link

[Error] ds_cnn_weights.h@1,28988: too many initializers for 'const q7_t [2560] {aka const sign #91

Closed lancezhangsf closed 5 years ago

lancezhangsf commented 5 years ago

HI,  I use my own data trainning model, then gen the weights.h, i chang arrays'name in weights.h and rename the weights.h for ds_cnn_weights.h compile the bin for stm32f746, but have some errors as follow:

Using targets from /opt/zsf_workspace/WorkSpace/SoundWorkSpace/ML-KWS-for-MCU/Deployment/kws_realtime_test/mbed/7130f322cb7e/targets.json [Error] @,: Compiler version mismatch: Have 5.4.1; expected version >= 6.0.0 and < 7.0.0 Building project kws_realtime_test (DISCO_F746NG, GCC_ARM) Scan: kws_realtime_test Scan: Source Scan: realtime_test Scan: Include Scan: Source Scan: Include Scan: Source Scan: Include Compile [100.0%]: ds_cnn.cpp [Error] ds_cnn_weights.h@1,28988: too many initializers for 'const q7_t [2560] {aka const signed char [2560]}' [Error] ds_cnn_weights.h@2,717: too many initializers for 'const q7_t [64] {aka const signed char [64]}' [Error] ds_cnn_weights.h@3,6690: too many initializers for 'const q7_t [576] {aka const signed char [576]}' [Error] ds_cnn_weights.h@4,785: too many initializers for 'const q7_t [64] {aka const signed char [64]}' [Error] ds_cnn_weights.h@5,125300: too many initializers for 'const q7_t [4096] {aka const signed char [4096]}' [Error] ds_cnn_weights.h@6,741: too many initializers for 'const q7_t [64] {aka const signed char [64]}' [Error] ds_cnn_weights.h@7,6765: too many initializers for 'const q7_t [576] {aka const signed char [576]}' [Error] ds_cnn_weights.h@8,748: too many initializers for 'const q7_t [64] {aka const signed char [64]}'

saichand07 commented 5 years ago

@lancezhangsf I understand your problem, delete your current ds_cnn_weights.h, generate it again and then compile. don't overwrite the file again again, that adds additional weights to your existed ds_cnn_weights.h, so that size of your ds_cnn_weights.h will increase.

that's why your getting this [Error] ds_cnn_weights.h@1,28988: too many initializers for 'const q7_t [2560] {aka const signed char [2560]}'

lancezhangsf commented 5 years ago

@lancezhangsf I understand your problem, delete your current ds_cnn_weights.h, generate it again and then compile. don't overwrite the file again again, that adds additional weights to your existed ds_cnn_weights.h, so that size of your ds_cnn_weights.h will increase.

that's why your getting this [Error] ds_cnn_weights.h@1,28988: too many initializers for 'const q7_t [2560] {aka const signed char [2560]}'

I have resloved the error, because of the output_class overflow in main.cpp.

saichand07 commented 5 years ago

could you tell me, how did you create your own dataset, did you do any data augmentation process ? how much data have you been collected?

Thanks saichand

lancezhangsf commented 5 years ago

@lancezhangsf could you tell me, how did you create your own dataset, did you do any data augmentation process ? how much data have you been collected?

Thanks saichand

you can refer https://www.tensorflow.org/tutorials/sequences/audio_recognition for trainning.

i use my own data.you can use aishell2's data.

I have 40,000 pieces of data.

saichand07 commented 5 years ago

Actually I want to create my own data set with some special keywords, what kind of device have you used for recording samples and does it require any post and pre processing ?

lancezhangsf commented 5 years ago

Actually I want to create my own data set with some special keywords, what kind of device have you used for recording samples and does it require any post and pre processing ?

Using stm32f746,
No need to process data,just need to change the wanted_words in train.py and test.py.......