ARM-software / ML-KWS-for-MCU

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

Optimal parameters for DS-CNN #117

Open idsparco97 opened 5 years ago

idsparco97 commented 5 years ago

I have trained a DS-CNN model with the same hyperparameters available in the guide. I have also done the fusion of batch normalization layers and after this I have tried to quantize weights and biases with the following command

python3 quant_test.py --model_architecture ds_cnn
  --model_size_info 5 64 10 4 2 2 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1 64 3 3 1 1
  --dct_coefficient_count 10 --window_size_ms 40 --window_stride_ms 20
  --checkpoint ../tmp/speech_commands_train/best/ds_cnn_9349.ckpt-22000_bnfused
  --act_max 32 0 0 0 0 0 0 0 0 0 0 0

I read in the guide that the value of act_max that I used, quantizes only the first layer (input layer) and not other layers. Has anyone experienced a good hyperparameters configuration to get a net suitable for Small class? I need a model that runs on a microcontroller with 128 KB of RAM, with an high accuracy.