this is the full error message that is outputted:
Traceback (most recent call last):

File "<ipython-input-146-14775fff4081>", line 78, in <module>
   loss_error = loss(outputs.squeeze(1), labels.long())

File "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 325, in __call__
    result = self.forward(*input, **kwargs)

File "/usr/local/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 372, in forward
    size_average=self.size_average)

File "/usr/local/lib/python3.6/site-packages/torch/nn/functional.py", line 1179, in binary_cross_entropy
    return torch._C._nn.binary_cross_entropy(input, target, weight, size_average)

RuntimeError: Expected object of type Variable[torch.FloatTensor] but found type 
Variable[torch.LongTensor] for argument #1 'target'