CAS-CLab/quantized-cnn

Quantizeing the Fully-connected Layer--->look-up table

zzqiuzz opened this issue · 2 comments

Hi! In your paper with respect to quantizing the FC layers,you divide weight matrix into M subspaces represented by a product of D and B.And during the test-phase, you store the results given by the computation of the inner products between S(m) and every sub-codeword in D(m) int a look-up table. For inputs as images which are different, they give different inputs S(m),so how's a look-up table working? Thank you!

The look-up table is computed on-the-fly, which means for each input image, we will generate a new look-up table, determined by its input S(m) and the pre-trained sub-codebook D(m).
The test-phase time complexity includes two parts: 1) computation of look-up tables and 2) computation of layer response based on these look-up tables. The overall time complexity is still lower than the standard computation routine.

I guess the term "pre-computed look-up tables" may lead to some of your misunderstanding. The "pre-computed" word actually refers that look-up tables are computed in advance to the computation of layer response, rather than computed in the training phase. Sorry for that.

Quite clear. thanks.