Since your model is on the GPU, you need to push your data and target onto the device as well.
Add this to your code:
data, target = data.to('cuda'), target.to('cuda')

Also as a small note: Variables are deprecated since PyTorch 0.4.0. You can just use tensors in the current releases.