This error usually is thrown when mixing up cuda.Tensors with CPU Tensors.
Could you post the line of code throwing this error?
Usually this should be enough to train your model on a GPU:
model = ...
model.cuda()
inp = Variable(torch.randn(6, 3, 224, 224).cuda())
output = model(inp)