Closed ccnankai closed 5 years ago
@saichand07
last inputlayer * w =8bit dec bias=10 ====> bias_shit=-2
@saichand07 Sorry, I am busy recently. The calculation step has been told in this question #51 .Check out the quant_guide and re-read the quantization section again.The steps are simple.Discuss problems together. swdtianxia@gmail.com
@ccnankai
I have calculated all the bias_shifts and out_shifts layer by layer by adjusting the input and output format (using act_max ), like they explained in the quant guide. I put those values in ds_cnn.h and I also tuned the recording window, averaging window len and detection threshold. but still deployed model on board is not detecting words correctly.
could you please tell me what else I need to taken care of. how did you deal with negative shift ?
Thank you very much
@saichand07 Did you calculate the MFCC_DEC_BITS ? How did you calculate it.Are you calculating the other *shift parameters correctly?
yes, I calculated shift parameters as they explained in the quant guide, How to calculate MFCC_DEC_BITS ? Actually, I didn't change its value, I put MFCC_DEC_BITS = 1 and also changed it to 2, but still its detecting wrong words
@ccnankai my first layer Q5.2 weights Q-3.10 bias Q1.6 output layer Q3.4
BIAS_RSHIFT = 2+10-6 = 6 OUT_LSHIFT = 2+10-4 = 8
I calculated all layers like this,
last layer I got negative shift and I don't know how to deal with it, Pool layer act_max I took Q3.4 and last layer Q5.2 so shift of pool layer is 4-2 = 2
could you tell me whatelse I need to consider ?
@saichand07 I think you still have the wrong calculation of the parameters.I can see good results.
Weights Q-3.10 Wrong, how did you get it?
after running Quant_test.py the weights are generated randomly, my parameters are window size_ms 40 window_stride_ms 20 dct_coefficient_count 10
Weights Q-3.10 This parameter is definitely wrong. No need to change any thing in fold_batchnorm.Are you a student, is this algorithm used for experimentation??
yes, how can we deal with this situation ?
How did you get this result Weights Q-3.10,This calculation step is wrong.
@ccnankai thanks, I found the problem, weights were wrong now its working
@ccnankai thanks, I found the problem, weights were wrong now its working
hello,can you tell me how to calculate Q of input and output?I have no idea....
@weishu20 the first layer is input layer(mfcc)
At the final fc layer bias dec bit =10. I calculated the last layer, wx=8 , bias=10 , bias_shit=-2,bias need to be shifted right 。 But there is no option for the right shift 。 what should I do with this situation.