@smth Thanks for following up.
Here’s the trace:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-34-a3ea2c1c18d8> in <module>()
     68             loss.backward()
     69             return loss
---> 70         optimizer.step(closure)
     71         # begin to predict
     72         future = 1000

/usr/local/lib/python3.5/dist-packages/torch/optim/lbfgs.py in step(self, closure)
     98 
     99         # evaluate initial f(x) and df/dx
--> 100         orig_loss = closure()
    101         loss = orig_loss.data[0]
    102         current_evals = 1

<ipython-input-34-a3ea2c1c18d8> in closure()
     63         def closure():
     64             optimizer.zero_grad()
---> 65             out = seq(input).cuda()
     66             loss = criterion(out, target)
     67             print('loss:', loss.data.numpy()[0])

/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    204 
    205     def __call__(self, *input, **kwargs):
--> 206         result = self.forward(*input, **kwargs)
    207         for hook in self._forward_hooks.values():
    208             hook_result = hook(self, input, result)

<ipython-input-34-a3ea2c1c18d8> in forward(self, input, future)
     27 
     28         for i, input_t in enumerate(input.chunk(input.size(1), dim=1)):
---> 29             h_t, c_t = self.lstm1(input_t, (h_t, c_t))
     30             h_t2, c_t2 = self.lstm2(c_t, (h_t2, c_t2))
     31             outputs += [c_t2]

/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    204 
    205     def __call__(self, *input, **kwargs):
--> 206         result = self.forward(*input, **kwargs)
    207         for hook in self._forward_hooks.values():
    208             hook_result = hook(self, input, result)

/usr/local/lib/python3.5/dist-packages/torch/nn/modules/rnn.py in forward(self, input, hx)
    497             input, hx,
    498             self.weight_ih, self.weight_hh,
--> 499             self.bias_ih, self.bias_hh,
    500         )
    501 

/usr/local/lib/python3.5/dist-packages/torch/nn/_functions/rnn.py in LSTMCell(input, hidden, w_ih, w_hh, b_ih, b_hh)
     23     if input.is_cuda:
     24         igates = F.linear(input, w_ih)
---> 25         hgates = F.linear(hidden[0], w_hh)
     26         state = fusedBackend.LSTMFused()
     27         return state(igates, hgates, hidden[1]) if b_ih is None else state(igates, hgates, hidden[1], b_ih, b_hh)

/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
    447 def linear(input, weight, bias=None):
    448     state = _functions.linear.Linear()
--> 449     return state(input, weight) if bias is None else state(input, weight, bias)
    450 
    451 

/usr/local/lib/python3.5/dist-packages/torch/nn/_functions/linear.py in forward(self, input, weight, bias)
      8         self.save_for_backward(input, weight, bias)
      9         output = input.new(input.size(0), weight.size(0))
---> 10         output.addmm_(0, 1, input, weight.t())
     11         if bias is not None:
     12             # cuBLAS doesn't support 0 strides in sger, so we can't use expand

TypeError: addmm_ received an invalid combination of arguments - got (int, int, torch.FloatTensor, torch.cuda.FloatTensor), but expected one of:
 * (torch.FloatTensor mat1, torch.FloatTensor mat2)
 * (torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
 * (float beta, torch.FloatTensor mat1, torch.FloatTensor mat2)
 * (float alpha, torch.FloatTensor mat1, torch.FloatTensor mat2)
 * (float beta, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
 * (float alpha, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
 * (float beta, float alpha, torch.FloatTensor mat1, torch.FloatTensor mat2)
      didn't match because some of the arguments have invalid types: (int, int, torch.FloatTensor, torch.cuda.FloatTensor)
 * (float beta, float alpha, torch.SparseFloatTensor mat1, torch.FloatTensor mat2)
      didn't match because some of the arguments have invalid types: (int, int, torch.FloatTensor, torch.cuda.FloatTensor)