I have changed my code so that I convert all tensors to cuda before wrapping them in Variables but now I am getting a different error (stack trace below):
Traceback (most recent call last):
  File "run_experiments.py", line 122, in <module>
    train_model(model, train_loader, nb_batches, optimizer, criterion, **vars(args))
  File "run_experiments.py", line 50, in train_model
    loss = criterion(predictions, targets[:, 1:, :])
  File "/if1/ab3cb/miniconda3/envs/fast_torch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 206, in __call__
    result = self.forward(*input, **kwargs)
  File "/if1/ab3cb/miniconda3/envs/fast_torch/lib/python3.5/site-packages/torch/nn/modules/loss.py", line 36, in forward
    return backend_fn(self.size_average, weight=self.weight)(input, target)
  File "/if1/ab3cb/miniconda3/envs/fast_torch/lib/python3.5/site-packages/torch/nn/_functions/thnn/auto.py", line 41, in forward
    output, *self.additional_args)
TypeError: FloatDistKLDivCriterion_updateOutput received an invalid combination of arguments - got (int, torch.FloatTensor, torch.cuda.FloatTensor, torch.FloatTensor, bool), but expected (int state, torch.FloatTensor input, torch.FloatTensor target, torch.FloatTensor output, bool sizeAverage)

I have edited the code to reflect the new changes