IMDB sent analysis, Assertion error for "assert filter_dim_a.prod() == filter_dim_a[0]"

Hello everyone,

I’m trying to run the notebook 4 on Sentiment Analysis on IMDB reviews. I did a few modifications to the original notebook to be able to run it on my local computer:

  1. I took a subset of the original data (200 reviews for training and 100 for testing).
  2. I decreased the batch size to 32 and the bptt to 50.

Now when I try to run

learner.fit(3e-3, 4, wds=1e-6, cycle_len=1, cycle_mult=2)

I receive an Assert error: it seems that it comes from there:

~/anaconda3/envs/fastai/lib/python3.6/site-packages/torch/backends/cudnn/rnn.py in get_parameters(fn, handle, weight_buf)
     163                 # might as well merge the CUDNN ones into a single tensor as well
     164                 if linear_id == 0 or linear_id == num_linear_layers / 2:
 --> 165                     assert filter_dim_a.prod() == filter_dim_a[0]
     166                     size = (filter_dim_a[0] * num_linear_layers // 2, filter_dim_a[2])
     167                     param = fn.weight_buf.new().set_(

Did anyone encounter this problem? I have no idea what it is about.

1 Like

I’m running into a similar issue. It looks like maybe a GPU issue as everything is working fine when I use the CPU, but as soon as I turn GPU on, it errors (I’m using a Kaggle Kernel). I don’t have a solution at this point, but my guess is that there is something incorrect about the CUDA usage possible. I know Kaggle’s GPU kernels are still in Beta so I’m hoping they are ironing out some kinks and that’s what is causing the issues. Planning on digging into it more soon though.