There are multiple issues with your code.

During testing phase, set Variable X_test's volatile attribute to True to save memory.
Instead of

X_test = Variable(X_test).cuda()

use
X_test = Variable(X_test.cuda(), volatile=True)



results is torch Variable. If you want to access the underlying data, use results.data instead of results itself,or you will get into trouble. (Since you are new to torch, I am not going to expand here.)

Also, you should format your post correctly and nicely using Markdown 8. For code, use code block 7.