ayaabdelsalam91 / Input-Cell-Attention

12 stars 3 forks source link

hello. something wrong when i run this project #1

Closed yangye19960922 closed 4 years ago

yangye19960922 commented 4 years ago

Hi, when i finish running trainModels.py and try to run saliency.py, an error occurs, it shows that RuntimeError: cudnn RNN backward can only be called in training mode image could you please teach me how to solve this problem ?

ayaabdelsalam91 commented 4 years ago

This can be solved by running this file on cpu instead of GPU getting the gradient for RNNs without training is currently not supported by cuda

yangye19960922 commented 4 years ago

thanks for your reply,i add "model.train()"into demo, and it works

---Original--- From: "ayaabdelsalam91"<notifications@github.com> Date: Thu, Jun 11, 2020 16:49 PM To: "ayaabdelsalam91/Input-Cell-Attention"<Input-Cell-Attention@noreply.github.com>; Cc: "Author"<author@noreply.github.com>;"yangye19960922"<921629128@qq.com>; Subject: Re: [ayaabdelsalam91/Input-Cell-Attention] hello. something wrong when i run this project (#1)

This can be solved by running this file on cpu instead of GPU getting the gradient for RNNs without training is currently not supported by cuda

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ayaabdelsalam91 commented 4 years ago

This will cause the weight of the model to update which is not something we want at this point

yangye19960922 commented 4 years ago

This will cause the weight of the model to update which is not something we want at this point

so you mean i need to run this file on cpu instead of adding 'model.train()' into file, becauce this operation will lead to wrong results?

ayaabdelsalam91 commented 4 years ago

yes