yikangshen/Ordered-Neurons

CAN RUN main.py without GPU.

Opened this issue · 2 comments

I install Pytorch0.4 which choose cuda none.And after i run the main.py ,i got a error:torch.cuda.LongTensor is not enabled.,which i haven't found a simillar problem online.whether i need use a computer with GPU and CUDA?

I had the same issue... in main.py simply add default=False in the argparse for the cuda argument :)

change
parser.add_argument('--cuda', action='store_false', help='use CUDA')
to
parser.add_argument('--cuda', action='store_false', default=False, help='use CUDA')

We wanted to run it with cuda by default, so we flipped the meaning of that flag. You can also use --cuda to run without cuda.

Sorry for the confusion.