CUDA error an illegal memory access was encountered 排查,LSTM 分配 hidden 行往往只是报错触发点

遇到 CUDA error: an illegal memory access was encountered 并且报错栈指向 LSTM 初始化 hidden、cell 状态这一行时,千万