ranahanocka / MeshCNN

Convolutional Neural Network for 3D meshes in PyTorch
MIT License
1.56k stars 314 forks source link

The environment requires Pytorch with CUDA #21

Closed hagar-dolev closed 4 years ago

hagar-dolev commented 4 years ago

Hey,

I have installed Pytorch without CUDA (since I don't have a NVIDIA gpu) and it raises an error that requires mending your code. AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

It might be worth mentioning in the Readme file.

It fails at:

MeshCNN/options/base_options.py", line 54, in parse torch.cuda.set_device(self.opt.gpu_ids[0])

I have tried changing it locally to work but it seems like it leads to more errors relating that. The issue is, since I can't use CUDA, which pytorch version should I install? (As I installed "CUDAless" version).

Thanks!

ranahanocka commented 4 years ago

Add the flag --gpu_ids -1 (e.g., to train.py)

It is defined in this line in base_options.py