Getting type mismatch error when making prediction

I’m getting the following error:
RuntimeError: Expected object of type Variable[torch.FloatTensor] but found type Variable[torch.cuda.FloatTensor] for argument #1 ‘mat2’

when making prediction (not training).

I made sure to move the model to gpu:

net = net.cuda()

as well as the input data:

    test_feat = Variable(test_feat, requires_grad=False)  
    r = net(test_feat)