It seems you might be breaking the computation graph by recreating the output tensor in:
output = torch.FloatTensor(output).cuda()

Instead of wrapping it in a FloatTensor, you should directly use it to calculate the loss.
Unrelated to your issue, but Variables are deprecated since PyTorch 0.4, so you can use tensors now.