You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/09/25 09:01:52 UTC

[GitHub] [incubator-mxnet] zixuanweeei commented on issue #16256: [Bug] Failed to evaluate gradient on samples with train_mode=False

zixuanweeei commented on issue #16256: [Bug] Failed to evaluate gradient on samples with train_mode=False
URL: https://github.com/apache/incubator-mxnet/issues/16256#issuecomment-534925721
 
 
   Thanks for reporting this issue. Actually, we need a workspace to store the intermediate result of RNN variants, like the output of every gate and the state of every step, which are created only when `is_train=True`. These intermediate results are used in the gradients' calculation. When `train_mode=False` (`is_train=False`), no workspace will be created in `Forward`. So it will raise the error in `Backward`.
   
   As to dropout, mxnet-mkl doesn't support it. But you can `export MXNET_USE_MKLDNN_RNN=0` to force MXNet run into the naive CPU-RNN path, where dropout are enabled. If you don't set `MXNET_USE_MKLDNN_RNN=0`, it should be `1` by default, which means that MKL-DNN RNN path without dropout enabled will be executed.
   
   For now, we don't have a good solution for your request. RNN operator has a different machnism than other operators. I will look for a solution. Ang insights? @ZhiminPeng 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services