Well, that really helped, and thanks for this…
BUT, I guess there’s something else too that I’ve probably done wrong…
Now, it seems like it’s getting the outputs fine but has problem in finding loss and is expecting scalar type Long. Here’s the traceback for the RuntimeError:
RuntimeError                              Traceback (most recent call last)
<ipython-input-213-e1854e4cd77a> in <module>
 ---> 16         loss = criterion(outputs, batch_y)
 ~/anaconda3/envs/LearningML/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
 --> 541             result = self.forward(*input, **kwargs)
~/anaconda3/envs/LearningML/lib/python3.6/site-packages/torch/nn/modules/loss.py in forward(self, input, target)
--> 916                                ignore_index=self.ignore_index, reduction=self.reduction)
~/anaconda3/envs/LearningML/lib/python3.6/site-packages/torch/nn/functional.py in cross_entropy(input, target, weight, size_average, ignore_index, reduce, reduction)
-> 2009     return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
~/anaconda3/envs/LearningML/lib/python3.6/site-packages/torch/nn/functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce, reduction)
   1836                          .format(input.size(0), target.size(0)))
   1837     if dim == 2:
-> 1838         ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
   1839     elif dim == 4:
   1840         ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Expected object of scalar type Long but got scalar type Double for argument #2 'target' in call to _thnn_nll_loss_forward