ML-KWS-for-MCU
ML-KWS-for-MCU copied to clipboard
Deployment of CRNN on STM32F746 mcu
@navsuda Thanks for this tutorial, I have a quantized version of CRNN, I would like to know, will Arm release recurrent functions for GRUs and LSTMs ?
Hi @saichand07 , Great ob in quantizing the CRNN model. I have a quick question for you. Could you share some insights on how did you go about quantizing the CRNN? You don't need to share your code, but if you can give me a brief overview, it would be great!
Thanks a lot.
Hi @bkanaki , I have used tensorflow act_max function for the quantization process, In this tutorial they have provided us quant_models.py for DNN and DS_CNN models, I just followed their method for CRNN model. you can also read this paper for more details https://arxiv.org/abs/1801.06601
Best regards
Thank you, @saichand07 . ~~I believe you used fake_quant_with_min_max_vars function, correct? The examples use that. But how did you calculate the act_max for each layer? OR did you just keep it at the default 128? I am not certain about how to calculate these values as of now. I checked the examples in quant_models.py.~~
I figured out what you mean in your reply. Now I only have two questions. 1. As this CRNN model uses two GRU cells, so do you need to put the fake_quant... calls twice? If so, how do you do that as I think we will have to get rid of MultiRNNCell call. 2. Are you getting the similar accuracy as the float model?
Once again, thanks for your help.
yes, I have used fake_quant_with_min_max_vars twice and I got nearly 1% depletion in accuracy.
Thanks! Were you able to verify that the fake quant nodes are added after each activation in the both GRU cells? For example, by inspecting the frozen graph trough tensorboard.
Thanks for asking this question :), I had verified that the fake_quant nodes are added after each activation in the both GRU cells, Have you deployed any of these models on MCU boards ?
No. Unfortunately I cannot verify the two fake quant nodes for each GRU cell. So I haven't done the next part.
@saichand07 I'm new in this topic. Would you mind to share the .py of CRNN to me?
@HKLee2040 CRNN GRU, LSTM were provided in this tutorial, check models.py
@saichand07 Got it! Thanks