nnom icon indicating copy to clipboard operation
nnom copied to clipboard

about calculate the MAC for GRU

Open promise1219 opened this issue 2 years ago • 2 comments

Hi I am confused about this code for GRU MAC calculation image What I know about LSTM MAC calculation is realized as following picture: image

Can you give more information? I will appreciate it very much. Looking forward to your reply.

promise1219 avatar Jun 22 '22 13:06 promise1219

GRU is different from LSTM. You can check the lstm layer compared to the screenshot.

For the mac here, I wrote it per the calculation perfored in the ops implemented, not following it's mathematical ops. Which might be different since the fixedpoint implementation are different from floatingpoint

majianjia avatar Jun 24 '22 07:06 majianjia

Thanks for your reply. I want to ask about calculating "cell->units * cell->units *8" and "cell->units * (3 + 3 + 5)" and in your comment I don't understand what "gate" "mult" "addition" means ? I know that MAC contains multiply-add

How to get 8? How to get (3+3+5)?

Can you give more information? I will appreciate it very much. Looking forward to your reply.

promise1219 avatar Jun 24 '22 07:06 promise1219