It’s actually a very similar error as the previous one. As you can see in the error message
TypeError: FloatClassNLLCriterion_updateOutput received an invalid combination of arguments - got (int, torch.FloatTensor, !torch.DoubleTensor!, torch.FloatTensor, bool, NoneType, torch.FloatTensor, int), but expected (int state, torch.FloatTensor input, torch.LongTensor target, torch.FloatTensor output, bool sizeAverage, [torch.FloatTensor weights or None], torch.FloatTensor total_weight, int ignore_index)

the function that you try to use called when doing loss = criterion(output, target) takes got as input a Float and a Double tensor (note that the DoubleTensor has some ! around it). It it was expecting Float and Long tensor. As you can see, the LongTensor is for the target.
So the second argument for your criterion that contains the target should be a LongTensor and not a DoubleTensor. Double check the doc for the criterion you used to make sure what it takes as target is what you give him.
In general in pytorch, every tensor that contains indices will be LongTensors.