l11x0m7 / Question_Answering_Models

This repo collects and re-produces models related to domains of question answering and machine reading comprehension
MIT License
155 stars 45 forks source link

Performance issue in the definition of cudnn_gru, MRC/BiDAF/layers.py(P1) #4

Open DLPerf opened 3 years ago

DLPerf commented 3 years ago

Hello, I found a performance issue in the definition of cudnn_gru, MRC/BiDAF/layers.py, tf.zeros([1, batch_size, num_units]) will be created repeatedly during program execution, resulting in reduced efficiency. I think it should be created before the loop.

The same issue exist in :

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.