Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Voxnet on CPU #26

Open
kpsiddharth opened this issue Aug 26, 2017 · 0 comments
Open

Running Voxnet on CPU #26

kpsiddharth opened this issue Aug 26, 2017 · 0 comments

Comments

@kpsiddharth
Copy link

Is it possible to run the code on CPU only? I have gone through the issues, and have been able to fix most of the problems I have been facing. At last, the following is the command I am using to train the ShapeNet model:

THEANO_FLAGS='device=cpu,force_device=True,floatX=float32' python train.py config/shapenet10.py ../shapenet10_train.tar

I have CUDA installed in /usr/local/cuda, and the PATH and LD_LIBRARY_PATH variables have been updated to have /usr/local/cuda/bin and /usr/local/cuda/lib64 respectively.

When I run the command though, it keeps failing with:
2017-08-26 15:28:06,904 INFO| Metrics will be saved to metrics.jsonl
2017-08-26 15:28:06,904 INFO| Compiling theano functions...
Traceback (most recent call last):
File "train.py", line 180, in
main(args)
File "train.py", line 132, in main
tfuncs, tvars = make_training_functions(cfg, model)
File "train.py", line 28, in make_training_functions
out = lasagne.layers.get_output(l_out, X)
File "/home/ubuntu/.local/lib/python2.7/site-packages/lasagne/layers/helper.py", line 185, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
File "/home/ubuntu/sandboxes/voxnet/voxnet/layers.py", line 225, in get_output_for
activation = conved + self.b.dimshuffle('x', 0, 'x', 'x', 'x')
File "/home/ubuntu/.local/lib/python2.7/site-packages/theano/tensor/var.py", line 128, in add
return theano.tensor.basic.add(self, other)
File "/home/ubuntu/.local/lib/python2.7/site-packages/theano/gof/op.py", line 507, in call
node = self.make_node(*inputs, **kwargs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/theano/tensor/elemwise.py", line 527, in make_node
inputs = map(as_tensor_variable, inputs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/theano/tensor/basic.py", line 145, in as_tensor_variable
return x._as_TensorVariable() # TODO: pass name and ndim arguments
File "/home/ubuntu/.local/lib/python2.7/site-packages/theano/sandbox/cuda/var.py", line 30, in _as_TensorVariable
return HostFromGpu()(self)
NameError: global name 'HostFromGpu' is not defined

In the above, Device is CPU and force_device is True. If I set force_device to false, then it fails to retrieve any GPUs - probably because I did not follow instructions to enable GPU usage at all. I am first trying to get it working on CPU, since that seems a simpler thing to do.

Can someone help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant