RuntimeError: CuDNN error: CUDNN_STATUS_INTERNAL_ERROR

Hi I am using pytorch 0.4.1, I got the error. I have tried the solution proposed in https://stackoverflow.com/questions/45810356/runtimeerror-cudnn-status-internal-error which is rm -rf ~/.nv

class cnn(nn.Module):
    def __init__(self, args):
        Ks = [3,4,5]
        self.convs1 = nn.ModuleList([nn.Conv2d(1, 100, (K, 10)) for K in Ks])
    def forward(self,x):
        x = [F.relu(conv(x)).squeeze(3) for conv in self.convs1]     

Any idea?

I ll explain the way I could fix the problem:

  1. I run my code on the cpu, and I found that there is an error on my embedding layer, which is

RuntimeError: index out of range at /opt/conda/condabld/pytorch_1532576128691/work/aten/src/TH/generic/THTensorMath.cpp:352

  1. I fix that issue and I don’t receive this error anymore

RuntimeError: CuDNN error: CUDNN_STATUS_INTERNAL_ERROR

The strange thing is that why on gpu my code does not stop on my embedding layer?