Thanks for the code. It’s quite huge and somehow it cannot import learner.py.
However, I skimmed through the code and one reason might be that you initialiye the states of your LSTM in MetaLearner.forward using .cuda().
This will push the states to the default GPU and DataParallel might throw the error.
You could fix this by checking, on which GPU the current LSTM parameters are and create the state according to this:
device = next(self.parameters()).device
self.lstm_c0 = torch.zeros(...).to(device)

Well, this would work in 0.4.0. Since you are using an older version, you could try the following:
param = next(self.parameters())
is_cuda = param.is_cuda
if is_cuda:
    cuda_device = param.get_device()
    self.lstm_c0 = Variable(torch.zeros(...)).cuda(cuda_device)

The code isn’t tested, so let me know, if you encounter any errors.